Hashtable.GetObjectData(SerializationInfo, StreamingContext) 方法

定義

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

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);
[System.Security.SecurityCritical]
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
[<System.Security.SecurityCritical>]
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 物件,包含序列化 Hashtable 所需的資訊。A SerializationInfo object containing the information required to serialize the Hashtable.

context
StreamingContext

StreamingContext 物件,包含 Hashtable 所關聯之序列化資料流的來源及目的地。A StreamingContext object containing the source and destination of the serialized stream associated with the Hashtable.

實作

屬性

例外狀況

infonullinfo is null.

已修改集合。The collection was modified.

備註

這個方法是一項作業 O(n) ,其中 nCountThis method is an O(n) operation, where n is Count.

適用於

另請參閱