Stack frames : StackTrace « Development « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Security.Principal;

public class MainClass
{
    internal static void A()
    {
        B(10, 50);
    }

    internal static void B(int x, int y)
    {
        C("Hello", x * y);
    }

    internal static void C(string label, int num)
    {
        StackTrace trace = new StackTrace();
        Console.WriteLine(trace.ToString());
    }

    public static void Main()
    {
        A();
    }
}








14.25.StackTrace
14.25.1.StackTrace and StackFrame
14.25.2.Stack frames