Get current stack trace information in CSharp

Description

The following code shows how to get current stack trace information.

Example


/*  ww w  . ja  v  a  2s.c o m*/
using System;

class Sample 
{
    public static void Main() 
    {
       Console.WriteLine("StackTrace: '{0}'", Environment.StackTrace);
    }
}




















Home »
  C# Tutorial »
    Development »




Console
Encoding
Environment
Random