System.Exception.GetObjectData Method

When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

Syntax

public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)

Parameters

info
The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
context
The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.

Remarks

GetObjectData sets a System.Runtime.Serialization.SerializationInfo with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0