I have seen this sort of thing in old MFC procgrams in C++ and I wonder what is the comparable way to do this in C#.

If I want a C# program to run differently in debug mode than in release mode, how do I do it? Don't I use some sort of #ifdef _DEBUG_ command?