public void ExampleFooMethod()
        {
            var c = new CallerInfoAttributeDemo();

            Debug.WriteLine(c.WhoCalledMe());
            Debug.WriteLine(c.WhatFileCalledMe());
            Debug.WriteLine(c.WhatLineCalledMe());
        }
Exemple #2
0
        static void Main2(string[] args)
        {
            var callerInfo = new CallerInfoAttributeDemo();

            Console.WriteLine(callerInfo.WhoCalledMe());
            Console.WriteLine(callerInfo.WhatFileCalledMe());
            Console.WriteLine(callerInfo.WhatLineCalledMe());

            //Don't do this
            Console.WriteLine(callerInfo.WhatLineCalledMe(111));
        }