predefined preprocessor constants

  • Thread starter Thread starter merkury1
  • Start date Start date
M

merkury1

Does C# have any predefined preprocessor constants like the C/C++
compiler does? In C++ you had such predefined constants as:
__cplusplus, _DEBUG, _WIN32, MSC_VER.

Are there any such things for C#? It would be nice if there were some
for .Net version (1 or 2), compact framework or full framework, etc.

Thanks.

Randy Beckwith
 
There are no predefined preprocessor directives in C#. You define your own,
either on the command line to the compiler, or in Visual Studio (or
web.config if it is an ASP.NET app). The Visual Studio Project setup
automatically inserts the "DEBUG" directive.
Peter
 
Back
Top