[Mono-list] Making code conditional on "not running on mono"?
17 May 2003 10:44:25 -0400
> Question to the Mono developers: Would it be worth making "/d:mono" or
> "/d:mcs" a default in mcs? That would make it possible to write code
> that compiles differently on Mono without having to specialcase your
> build scripts.
This already exists. From the man page:
During compilation the MCS compiler defines the __MonoCS__
symbol, this can be used by pre-processor instructions to compile
Mono C# compiler specific code.