Show/Hide Toolbars



When the X# compiler encounters an #ifdef directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined.

The #ifdef statement in X# is Boolean and only tests whether the symbol has been defined or not. For example,


// DEBUG may be defined from the command line
// ...
   Console.WriteLine("Debug version");
   Console.WriteLine("Release version");


The /vo8 compiler option will change this behavior:

when /vo8 is active then any symbol defined with TRUE or a non-0 numeric value will be seen as "defined", symbols defined with FALSE or a 0 numeric value will be seen as "undefined".


See also