well , I am feeling HAPPY to answer your question , I would like to suggest you to access the source site if it's available , for more information.
Yes - the feature which stands out is the StackTrace property. This provides a call stack which records where the exception was thrown from. For example, the following code: using System; class CApp { public static void Main() { try { f(); } catch( Exception e ) { Console.WriteLine( "System.Exception stack trace = \n{0}", e.StackTrace ); } } static void f() { throw new Exception( "f went pear-shaped" ); } } Note, however, that this stack trace was produced from a debug build.
using System;
class CApp
{
public static void Main()
{
try
{
f();
}
ca tch( Exception e )
{
Console.WriteLine( "System.Exception stack trace = \n{0}", e.StackTrace );
}
}
static void f()
{
throw new Exception( "f went pear-shaped" );
}
}
produces this output:
System.Exception stack trace =
at CApp.f()
at CApp.Main()
Note, however, that this stack trace was produced from a debug build. A release build may optimise away some of the method calls which could mean that the call stack isn't quite what you expect.
For more information , please do visit source site:
http://www.developeriq. com/a rticles/2008/apr/28/advance-to pics- net-interview-part2/
Hope it will help you out.
Answered by
Uttam
, an ibibo Master,
at
9:00 PM on June 02, 2008