Search code examples
c#mono

Mono compiler indication


Because Mono doesn't support some windows functions in .NET, is there any pre-compiler derivative that indicates that the compiler is a mono compiler?

Example, in Visual Studio there is a derivative #DEBUG and #TRACE is there such a derivative for mono that's something like `#MONO' that automatically is added if the compiler is mono?

Or do we have to add the derivative ourselves and change as necessary?


Solution

  • Mono compiler defines MonoCS, I think

    So:

    #if __MonoCS__
    

    should work...