How to detect which .NET runtime is being used (MS vs. Mono)?

From the Mono Project’s Guide to Porting Winforms Applications:

public static bool IsRunningOnMono ()
{
    return Type.GetType ("Mono.Runtime") != null;
}

I’m sure you’ll have a lot more questions, so worth checking this guide and the mono-forums

Leave a Comment