Dictionary<TKey,TValue>.GetObjectData(SerializationInfo, StreamingContext) Method

Definition

Implementiert die ISerializable-Schnittstelle und gibt die zum Serialisieren der Dictionary<TKey,TValue>-Instanz erforderlichen Daten zurück.Implements the ISerializable interface and returns the data needed to serialize the Dictionary<TKey,TValue> 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);
[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
Public Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

Ein SerializationInfo-Objekt mit den zum Serialisieren der Dictionary<TKey,TValue>-Instanz erforderlichen Informationen.A SerializationInfo object that contains the information required to serialize the Dictionary<TKey,TValue> instance.

context
StreamingContext

Eine StreamingContext-Struktur, die die Quelle und das Ziel des serialisierten Streams enthält, der der Dictionary<TKey,TValue>-Instanz zugeordnet ist.A StreamingContext structure that contains the source and destination of the serialized stream associated with the Dictionary<TKey,TValue> instance.

Implements

Attributes

Exceptions

info ist nullinfo is null.

Remarks

Bei dieser Methode handelt es sich um einen O (n)-Vorgang, bei dem n Countist.This method is an O(n) operation, where n is Count.

Applies to

See also