You can do that with .NET conditional compilation, no need for the C style macros.
Actually even in ISO C, the pre-processor is not required to be separated from the language, it is just kept that way in most compilers due to how C was originally implemented.
Even C++ is reducing the need to keep using the pre-processor with each ISO revision, in an ideal modern C++ world without C legacy baggage, the pre-processor will be so half assed like in C#. C++20 is already almost there.