Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C Sharp only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C Sharp
C/C++ style macros missing in C#?
Collapse
This topic is closed.
X
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Annonymous Coward
#1
C/C++ style macros missing in C#?
Jun 27 '08, 07:59 PM
Has C# got similar functionality to the __FILE__, __LINE__ and
__FUNCTION__ macros in C and C++ ?
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
#2
Jun 27 '08, 07:59 PM
Re: C/C++ style macros missing in C#?
Annonymous Coward wrote:
Has C# got similar functionality to the __FILE__, __LINE__ and
__FUNCTION__ macros in C and C++ ?
No.
You can get the information runtime if build with debug and
willing to pay the overhead associated with it.
See:
StackFrame Class (System.Diagnostics)
http://msdn.microsoft.com/en-us/library/system.diagnostics.stackframe_members.aspx
Provides information about a StackFrame, which represents a function call on the call stack for the current thread.
Arne
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment