asp.net.ph

Exception.StackTrace Property

System Namespace   Exception Class


Returns a string representation of the frames on the call stack at the time the current exception was thrown.

[ VB ]
<Serializable>
<ClassInterface ( ClassInterfaceType.AutoDual ) >
Overridable Public ReadOnly Property StackTrace As String

[ C# ]
[ Serializable ]
[ ClassInterface ( ClassInterfaceType.AutoDual ) ]
public virtual string StackTrace {get;}

[ C++ ]
[ Serializable ]
[ ClassInterface ( ClassInterfaceType.AutoDual ) ]
public: __property virtual String* get_StackTrace ( );

[ JScript ]
public Serializable
   ClassInterface ( ClassInterfaceType.AutoDual )
function get StackTrace ( ) : String;

Property Value

A string that describes the contents of the call stack, with the most recent method call appearing first.

Remarks

The execution stack keeps track of all the methods that are in execution at a given instant. A trace of the method calls is called a stack trace. The stack trace listing provides a means to follow the call sequence to the line number in the method where the exception occurs.

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

Notes to Inheritors: The StackTrace property is overridden in classes that require control over the stack trace content or format.

By default, the stack trace is captured immediately before an exception object is thrown. Use Environment.StackTrace to get stack trace information when no exception is being thrown.

See Also

Exception Members   Environment.StackTrace Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph