The Mono compiler defines __MonoCS__
BUT, BUT, BUT, the whole point of Mono is that you can take an assembly that you built with VS and run it on Mono, or vice versa.
It seems to me that if you need to have Mono vs MS.NET differences, then you need to be making those decisions at run-time.
The standard way to detect Mono at Runtime is:
bool runningOnMono = Type.GetType ("Mono.Runtime") != null;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…