G
Guest
Hi,
I would like to output the source code module name and line number in some of my Trace.Writeline() calls. The information that I need is in the Environment.StackTrace string however I DO NOT want to issue a full stack trace and then parse a string every time I wish to Trace source code info!!!!!!!! For you ex-C++ now C# coders I wanna do something like this:
Trace.WriteLine(__FILE__ + "-" + __LINE__ + ": " + msg);
Is there a better way to get this info - say through reflection?? - without issuing a full stack trace every time I log information?
For extra credit does anybody know how to get the class & method name without issuing a full stack trace/parse????
--Richard
I would like to output the source code module name and line number in some of my Trace.Writeline() calls. The information that I need is in the Environment.StackTrace string however I DO NOT want to issue a full stack trace and then parse a string every time I wish to Trace source code info!!!!!!!! For you ex-C++ now C# coders I wanna do something like this:
Trace.WriteLine(__FILE__ + "-" + __LINE__ + ": " + msg);
Is there a better way to get this info - say through reflection?? - without issuing a full stack trace every time I log information?
For extra credit does anybody know how to get the class & method name without issuing a full stack trace/parse????
--Richard