PC Review


Reply
Thread Tools Rate Thread

Are there __FILE__, __LINE__ macro equivalents for C# ?

 
 
=?Utf-8?B?Y2Jybw==?=
Guest
Posts: n/a
 
      18th May 2006
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.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWljaGFlbCBOZW10c2V2?=
Guest
Posts: n/a
 
      19th May 2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there anything like __FILE__ and __LINE__ ? wsq Microsoft C# .NET 3 15th Feb 2006 07:56 AM
Trying to replace old-fashioned __FILE__ and __LINE__ capability. =?Utf-8?B?QnJpYW5S?= Microsoft Dot NET Compact Framework 0 1st Feb 2006 01:21 AM
Truth or fiction __LINE__ and C1055? =?Utf-8?B?U2N5dGhlbg==?= Microsoft VC .NET 1 28th Dec 2005 08:03 AM
__LINE__, __FILE__, et al Daniel O'Connell [C# MVP] Microsoft C# .NET 1 8th Mar 2004 02:16 PM
__LINE__ and __PATH__ function. Sky Microsoft C# .NET 2 4th Mar 2004 02:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:34 PM.