Mono Class Library: System.Exception Overview | Members

System.Exception.StackTrace Property

Gets a string representation of the frames on the call stack at the time the current Exception was thrown. [Edit]

public virtual string StackTrace { get; }

Value

A string that describes the contents of the call stack. [Edit]

Remarks

Note: Exception.StackTrace might not report as many method calls as expected, due to code transformations, such as inlining, that occur during optimization.

This property is read-only.

Operation

The format of the information returned by this property is required to be identical to the format of the information returned by Environment.StackTrace .

Note to Inheritors

The Exception.StackTrace property is overridden in classes that require control over the stack trace content or format.

Usage

Use the Exception.StackTrace property to obtain a string representation of the contents of the call stack at the time the exception was thrown.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0