StackTrace and StackFrame : StackTrace : Development C# Examples


C# Examples » Development » StackTrace »

 

StackTrace and StackFrame









    
using  System;
using  System.Runtime.InteropServices;
using  System.Diagnostics;

public  sealed  class  MainClass
{
        static  void  Main()
        {
                StackTrace  creationStackTrace  =  new  StackTrace(1,  true);
                for(  int  i  =  0;i  <  creationStackTrace.FrameCount;  ++i  )  {
                          StackFrame  frame  =    creationStackTrace.GetFrame(i);
                          Console.WriteLine(  "      {0}",  frame.ToString()  );
                }        
        }
}
    
   
  
   



Output

US format: (1.12346 1.12346)
DE format: (1,12346 1,12346)
Object.ToString(): (1.12345678 1.12345678)


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» StackTrace