65.9K
CodeProject is changing. Read more.
Home

Conditional compilation using #if#endif block

starIconstarIconstarIconstarIconemptyStarIcon

4.00/5 (2 votes)

Aug 26, 2010

CPOL
viewsIcon

8607

If you need to include different environment variables between production and dev by making use of the #if DEBUG #endif block public void main() { Console.WriteLine("Release code"); #if Debug Console.WriteLine("Debug code"); #endif }