Are there __FILE__, __LINE__ macro equivalents for C# ?

G

Guest

Is there a C# equivalent for the C++ macros __FILE__ and __LINE__ ? They are
quite handy for pinpointing where an event log entry was generated. I am
using Visual Studio.NET 2003.
 
G

Guest

Unfortunatelly, C# don't support these macros, but look at StackTrace there
http://msdn.microsoft.com/library/d...rlrfSystemEnvironmentClassStackTraceTopic.asp

it may help you in some cases.
Is there a C# equivalent for the C++ macros __FILE__ and __LINE__ ? They are
quite handy for pinpointing where an event log entry was generated. I am
using Visual Studio.NET 2003.

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top