Click or drag to resize
Exception Class
Represents errors that occur during application execution.
Inheritance Hierarchy

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public class Exception : ISerializable, _Exception

The Exception type exposes the following members.

Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the runtime type of the current instance.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Creates and returns a string representation of the current exception.
(Overrides ObjectToString.)
Top
Properties
  NameDescription
Public propertyInnerException
Gets the Exception instance that caused the current exception.
Public propertyMessage
Gets a message that describes the current exception.
Public propertyStackTrace
Gets a string representation of the immediate frames on the call stack.
Top
Events
  NameDescription
Protected eventSerializeObjectState
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
Top
See Also