C# Macro definitions in Preprocessor

No, C# does not support preprocessor macros like C. Visual Studio on the other hand has snippets. Visual Studio’s snippets are a feature of the IDE and are expanded in the editor rather than replaced in the code on compilation by a preprocessor.

What makes Lisp macros so special?

Reading Paul Graham’s essays on programming languages one would think that Lisp macros are the only way to go. As a busy developer, working on other platforms, I have not had the privilege of using Lisp macros. As someone who wants to understand the buzz, please explain what makes this feature so powerful. Please also … Read more

Error: macro names must be identifiers using #ifdef 0

The #ifdef directive is used to check if a preprocessor symbol is defined. The standard (C11 6.4.2 Identifiers) mandates that identifiers must not start with a digit: The correct form for using the pre-processor to block out code is: You can also use: but you need to be confident that the symbols will not be inadvertently set by code … Read more