NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext) 方法

定義

實作 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 物件,包含序列化 NameObjectCollectionBase 執行個體所需的資訊。A SerializationInfo object that contains the information required to serialize the NameObjectCollectionBase instance.

context
StreamingContext

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

實作

例外狀況

infonullinfo is null.

備註

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

適用於

另請參閱