C/C++ style macros missing in C#?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Annonymous Coward

    C/C++ style macros missing in C#?

    Has C# got similar functionality to the __FILE__, __LINE__ and
    __FUNCTION__ macros in C and C++ ?
  • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

    #2
    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:

    Provides information about a StackFrame, which represents a function call on the call stack for the current thread.


    Arne

    Comment

    Working...