P
pz
How do I output the name of the method or a function without hard-coding it
in the application?
Say, I want application to write to stdout the name of the method that
currently is getting executed, to give me better idea how the program logic
is flowing (I am writing a multithreaded application). Instead of copying
Console.Writeline("Method123");
and pasting it to 100+ methods, and then correcting the names of the modules
in each one of them, is there a variable that would contain the name of the
method that has control. There's got to be a better way than hard-coding
it...
in the application?
Say, I want application to write to stdout the name of the method that
currently is getting executed, to give me better idea how the program logic
is flowing (I am writing a multithreaded application). Instead of copying
Console.Writeline("Method123");
and pasting it to 100+ methods, and then correcting the names of the modules
in each one of them, is there a variable that would contain the name of the
method that has control. There's got to be a better way than hard-coding
it...