Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TypeLoadException.GetObjectData Method

Sets the SerializationInfo object with the class name, method name, resource ID, and additional exception information.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

abstract GetObjectData : 
        info:SerializationInfo * 
        context:StreamingContext -> unit  
override GetObjectData : 
        info:SerializationInfo * 
        context:StreamingContext -> unit

Parameters

info
Type: System.Runtime.Serialization.SerializationInfo

The object that holds the serialized object data.

context
Type: System.Runtime.Serialization.StreamingContext

The contextual information about the source or destination.

Implements

ISerializable.GetObjectData(SerializationInfo, StreamingContext)
_Exception.GetObjectData(SerializationInfo, StreamingContext)

ExceptionCondition
ArgumentNullException

The info object 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 object is reconstituted from the SerializationInfo transmitted over the stream.

For more information, see XML and SOAP Serialization.

[Visual Basic, C#]

The following example generates an exception, and serializes the exception data to a file, and then reconstitutes the exception. For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see Assembly Names.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • SecurityCriticalAttribute 

    Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Show:
© 2015 Microsoft