Custom Exception(Serialization Info, Streaming Context) Constructor
Initializes a new instance of the Exception class with serialized data.
Definition
Namespace: XMLCommentsExamples.DocumentationInheritance
Assembly: XMLCommentsExamples (in XMLCommentsExamples.dll) Version: 2025.4.26.0
Assembly: XMLCommentsExamples (in XMLCommentsExamples.dll) Version: 2025.4.26.0
C#
protected CustomException(
SerializationInfo info,
StreamingContext context
)VB
Protected Sub New (
info As SerializationInfo,
context As StreamingContext
)C++
protected:
CustomException(
SerializationInfo^ info,
StreamingContext context
)F#
new :
info : SerializationInfo *
context : StreamingContext -> CustomExceptionParameters
- info SerializationInfo
- The SerializationInfo that holds the serialized object data about the exception being thrown.
- context StreamingContext
- The StreamingContext that contains contextual information about the source or destination.
Exceptions
| ArgumentNullException | info is . |
| SerializationException | The class name is or HResult is zero (0). |