Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SqlException::GetObjectData Method (SerializationInfo^, StreamingContext)

 

Sets the SerializationInfo with information about the exception.

Namespace:   System.Data.SqlClient
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
Return to top
Show:
© 2017 Microsoft