I prefer the
[Conditional("DEBUG")]
attribute over
#if DEBUG
.
This is especially advised for your logging example.
E.g.
[System.Diagnostics.Conditional("DEBUG")]
private void Validate() { }
or
[System.Diagnostics.Conditional("DEBUG")]
public static void DebugLog(string message) { ... }
You call these methods like any other method. The compiler will
not add any call code if "DEBUG" is not defined.
BTW: Your resoning of "not Debug" equals "Release" is not true in general, you might have other configurations than only the default "Debug" and "Release" configurations.