OperatingSystem.GetObjectData(SerializationInfo, StreamingContext) Method

Definition

Populates a SerializationInfo object with the data necessary to deserialize this instance.

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 serialization information.

context
StreamingContext

The place to store and retrieve serialized data. Reserved for future use.

Implements

Attributes

Exceptions

info is null.

Remarks

The context parameter is reserved for future use; it is currently not implemented in the GetObjectData method.

For more information, see the SerializationInfo.AddValue method.

Security

SecurityPermission
for providing 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