DataException Constructor (SerializationInfo, StreamingContext)
Initializes a new instance of the DataException class with serialized data, for use in remoting scenarios.
Namespace: Microsoft.VisualStudio.TeamSystem.Data.Common.Exceptions
Assembly: Microsoft.VisualStudio.TeamSystem.Data (in microsoft.visualstudio.teamsystem.data.dll)
Syntax
'Declaration
Protected Sub New ( _
info As SerializationInfo, _
context As StreamingContext _
)
'Usage
Dim info As SerializationInfo
Dim context As StreamingContext
Dim instance As New DataException(info, context)
protected DataException (
SerializationInfo info,
StreamingContext context
)
protected:
DataException (
SerializationInfo^ info,
StreamingContext context
)
protected DataException (
SerializationInfo info,
StreamingContext context
)
protected function DataException (
info : SerializationInfo,
context : StreamingContext
)
Parameters
- info
The SerializationInfo that holds the serialized object data about the exception being thrown.
- context
The StreamingContext that contains contextual information about the source or destination.
Exceptions
Exception type | Condition |
---|---|
The info parameter is a null reference (Nothing in Visual Basic). |
|
The class name is a null reference (Nothing in Visual Basic) or HResult is zero (0). |
Remarks
This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. For more information, see Binary Serialization.
See Also
Reference
DataException Class
DataException Members
Microsoft.VisualStudio.TeamSystem.Data.Common.Exceptions Namespace
SerializationInfo
StreamingContext
ArgumentNullException
SerializationException
HResult