Comparer.GetObjectData(SerializationInfo, StreamingContext) Method

Definition

Populates a SerializationInfo object with the data required for serialization.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Security.SecurityCritical]
public 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 Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The object to populate with data.

context
StreamingContext

The context information about the source or destination of the serialization.

Implements

Attributes

Exceptions

info is null.

Remarks

While the GetObjectData method is not visible to COM clients by default, inheriting the Comparer class can expose it and can cause undesirable behavior in COM clients.

Security

SecurityPermission
for the ability to provide serialization services. Associated enumeration: SerializationFormatter Security action: LinkDemand

SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Applies to