I have this code in my C# class.
#if DEBUG
private const string BASE_URL = \"http://www.a.com/\";
#else
private const string BASE_URL = \"h
Go to "Project Properties"--> Build Tab of the application. If the Configuration: Active (Debug) then Debug configuration is enabled. Below code will print to console.
#if DEBUG
Console.WriteLine("in debug mode...");
#endif
If Configuration: Active(Release) then Release configuration is enabled.Below code will print to console.
#if RELEASE
Console.WriteLine("in release mode...");
#endif
If you want to switch between DEBUG and RELEASE mode use the "Debug/Release/Configuration Manager" drop down right under the Tools Menu.Apologies as most of the developer know it...but is sometimes overlooked and causes confusion why above code is not running correctly.