System.Diagnostics.StackTrace Class

Represents a stack trace, which is an ordered collection of one or more stack frames.

See Also: StackTrace Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public class StackTrace

Remarks

System.Diagnostics.StackTrace information will be most informative with Debug build configurations. By default, Debug builds include debug symbols, while Release builds do not. The debug symbols contain most of the file, method name, line number, and column information used in constructing System.Diagnostics.StackFrame and System.Diagnostics.StackTrace objects.

System.Diagnostics.StackTrace might not report as many method calls as expected, due to code transformations that occur during optimization.

Requirements

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