By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,079 Members | 901 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,079 IT Pros & Developers. It's quick & easy.

Are there __FILE__, __LINE__ macro equivalents for C# ?

P: n/a
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.
May 18 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Unfortunatelly, C# don't support these macros, but look at StackTrace there
http://msdn.microsoft.com/library/de...TraceTopic.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

May 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.