System.Diagnostics.StackTrace Class

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

See Also: StackTrace Members


public class StackTrace


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.


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