No Preprocessor Macros

In C and C++, it was common to use macros that the preprocessor interpreted. The preprocessor works before the code is compiled, and in the case of macros, one string is replaced by another before compiling takes place. The preprocessor was extremely convenient, but it also was used in ways that eventually caused problems. C# doesn't have a separate preprocessor, but it processes preprocessor directives as if there was one. The preprocessor directives are mostly the same as for the C and C++ preprocessor, such as #if, #else, and #endif as well as preprocessor directives used by Visual Studio .NET, such as #region and #endregion. However, the #ifdef directive is not present.

0 0

Post a comment