Is there a way in C# to replicate a '#ifndef _DEBUG' from C/C++?
#if DEBUG
Console.WriteLine("Debug version");
#endif
#if !DEBUG
Console.WriteLine("NOT Debug version");
#endif
See this.
#if !DEBUG
// whatever
#endif
Yes you can use preprocessors in C#.
Here is a list from msdn
http://msdn.microsoft.com/en-us/library/ed8yd1ha(VS.71).aspx