Interview Questions

Does C# support C type macros?

C# Interview Questions and Answers


(Continued from previous question...)

102. Does C# support C type macros?

No. C# does not have macros. Keep in mind that what some of the predefined C macros (for example, __LINE__ and __FILE__) give you can also be found in .NET classes like System.Diagnostics (for example, StackTrace and StackFrame), but they'll only work on debug builds.

(Continued on next question...)

Other Interview Questions