You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
684 B
C#

/*
* C# Program to Create an Instance of StackTrace and to Get all Frames
*/
using System.Diagnostics;
using System;
class program
{
public static void Main()
{
StackTrace stackTrace = new StackTrace();
StackFrame[] stackFrames = stackTrace.GetFrames();
// write call stack method names
Console.WriteLine("Method Names : ");
foreach (StackFrame stackFrame in stackFrames)
{
Console.WriteLine(stackFrame.GetMethod().Name);
}
Console.Read();
}
}
/*
Method Names :
Main
nExecuteAssembly
ExecuteAssembly
RunUsersAssembly
ThreadStart_Context
Run
ThreadStart