This meant an easy solution for my ‘problem’!
Pre-processor directives can be defined using #define (making the directive true) and #undef (making it false) in C#. When you check one of these directives using an #if … #else … #endif statement Visual Studio even greys out the code that will not be compiled, because of the directives. This gives you a pretty good idea which code will and which code will not be compiled into the final assembly.
Because of the pre-processor directive behaviour, you can easily create cross-platform applications by simply changing one directive. Changing that one directive may change complete pieces of code in your application.