NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) Method

定義

實作 ISerializable 介面,並傳回序列化 NameObjectCollectionBase 執行個體所需的資料。Implements the ISerializable interface and returns the data needed to serialize the NameObjectCollectionBase instance.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

SerializationInfo 物件,包含序列化 NameObjectCollectionBase 執行個體所需的資訊。A SerializationInfo object that contains the information required to serialize the NameObjectCollectionBase instance.

context
StreamingContext StreamingContext StreamingContext StreamingContext

StreamingContext 物件,包含與 NameObjectCollectionBase 執行個體相關聯之已序列資料流的來源和目的地。A StreamingContext object that contains the source and destination of the serialized stream associated with the NameObjectCollectionBase instance.

實作

例外狀況

備註

這個方法是 O (n) 運算,其中nCountThis method is an O(n) operation, where n is Count.

安全性

SecurityPermission
提供序列化服務。for providing serialization services. 相關聯的列舉型別: SerializationFormatter 安全性動作: LinkDemandAssociated enumeration: SerializationFormatter Security action: LinkDemand

適用於

另請參閱