Use marco to define flag variable : Preprocessor Directives : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Preprocessor Directives »

 

Use marco to define flag variable








    
 


#define DEBUGGING

using System;

class Starter {
#if DEBUGGING
    static void OutputLocals() {
        Console.WriteLine("debugging...");
    }
#endif
    static void Main() {
#if DEBUGGING
        OutputLocals();
#endif
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Preprocessor Directives