Conditional compilation using #if#endif block





4.00/5 (2 votes)
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
}