mscorlib 2.0.0.0 4.0.0.0 System.Exception

Some languages, such as C++, allow you to throw exceptions of any managed type. Other languages, such as Microsoft C# and Visual Basic, require that every thrown exception be derived from the class. To maintain compatibility between languages, the common language runtime (CLR) wraps objects that do not derive from in a object.

You can use the class to specify whether exceptions should appear wrapped inside catch blocks and exception filters for an assembly. Many language compilers, including the Microsoft C# and Visual Basic compilers, apply this attribute by default to specify the wrapping behavior.

Note that the runtime still wraps exceptions even if you use the class to specify that you do not want them wrapped. In this case, exceptions are unwrapped only inside catch blocks or exception filters.

Wraps an exception that does not derive from the class. This class cannot be inherited.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.

  Sets the object with information about the exception.

  The object that holds the serialized object data about the exception being thrown. The object that contains contextual information about the source or destination.
- Property
  2.0.0.0
  4.0.0.0
  System.Object To be added.

  The property gets an object that was thrown as an exception from a language that allows exceptions that do not derive from the class.

  Gets the object that was wrapped by the object.