predefined preprocessor constants

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top