SqlException::GetObjectData Method (SerializationInfo^, StreamingContext)
.NET Framework (current version)
Sets the SerializationInfo with information about the exception.
Assembly: System.Data (in System.Data.dll)
public: [SecurityPermissionAttribute(SecurityAction::LinkDemand, Flags = SecurityPermissionFlag::SerializationFormatter)] virtual void GetObjectData( SerializationInfo^ si, StreamingContext context ) override
Parameters
- si
-
Type:
System.Runtime.Serialization::SerializationInfo^
The SerializationInfo that holds the serialized object data about the exception being thrown.
- context
-
Type:
System.Runtime.Serialization::StreamingContext
The StreamingContext that contains contextual information about the source or destination.
| Exception | Condition |
|---|---|
| ArgumentNullException | The si parameter is a null reference (Nothing in Visual Basic). |
GetObjectData sets a SerializationInfo with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.
.NET Framework
Available since 1.1
Available since 1.1
Show: