Exception.InnerException Property
Gets the Exception instance that caused the current exception.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
public Exception InnerException { get; }
Property Value
An instance of the Exception class that describes the error that caused the current exception. The InnerException property returns the same value that was passed to the constructor, or it returns a null reference if the inner exception value was not supplied to the constructor.
Remarks
This property is read-only.
When an exception (X) is thrown as a direct result of a previous exception (Y), the InnerException property of X should contain a reference to Y.
Version Information
Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.