I have C ++ code that I am trying to port to C #. There, in C ++, I used the following macro definition for debugging purposes.
#define CODE_LOCATION(FILE_NAME, LINE_NUM, FUNC_NAME) LINE_NUM, FILE_NAME, FUNC_NAME #define __CODE_LOCATION__ CODE_LOCATION(__FILE__, __LINE__, __FUNCTION__)
Are there similar constructions in C #? I know there are no macros in C #, but is there any other way to get the current values โโof a file, line and function at runtime?
Nirmh
source share