_Exception.GetObjectData(SerializationInfo, StreamingContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides COM objects with version-independent access to the GetObjectData(SerializationInfo, StreamingContext) method.
public:
void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public 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
[<System.Security.SecurityCritical>]
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Sub GetObjectData (info As SerializationInfo, context As StreamingContext)
Parameters
- info
- SerializationInfo
The SerializationInfo object that holds the serialized object data about the exception being thrown.
- context
- StreamingContext
The StreamingContext structure that contains contextual information about the source or destination.
- Attributes
Remarks
This method is for access to managed classes from unmanaged code and should not be called from managed code.
The Exception.GetObjectData method sets the SerializationInfo object with information about the exception.