Check out the StackFrame class
http://msdn2.microsoft.com/en-US/lib...tackframe.aspx
.... it can do this without issue, it can also tell you who called you.
The simplest example would be
StackFrame s = new StackFrame();
Console.WriteLine(s.GetMethod());
Cheers,
Greg Young
MVP - C#
"Filip De Backer" <fi*************@hotmail.com.(donotspam)> wrote in message
news:77**********************************@microsof t.com...
Hi everyone,
public static string NameFunction(string param)
{
....
string nameofthisfunction = 'XXX';
}
how can I get in code the name of the function where the code is execute?
Is that even possible?
thanks in advance,
Filip