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
More Related Contents:
- Process.start: how to get the output?
- In C#, why is String a reference type that behaves like a value type?
- How do ValueTypes derive from Object (ReferenceType) and still be ValueTypes?
- An object reference is required to access non-static member
- C# ‘is’ operator performance
- Why cannot C# generics derive from one of the generic type parameters like they can in C++ templates? [duplicate]
- How to connect to database from Unity
- Static Generic Class as Dictionary
- Why C# is not allowing non-member functions like C++
- Mono https webrequest fails with “The authentication or decryption has failed”
- Why check this != null?
- explicitly cast generic type parameters to any interface
- What is a “rooted reference”?
- sizeof(int) on x64?
- How do I get the available wifi APs and their signal strength in .net?
- Is casting the same thing as converting?
- Why does struct alignment depend on whether a field type is primitive or user-defined?
- In a switch vs dictionary for a value of Func, which is faster and why?
- How to convert a simple .Net console project a into portable exe with Mono and mkbundle?
- Why only literal strings saved in the intern pool by default?
- What is the best way to run ServiceStack on Linux / Mono?
- Unable to load SqlServerSpatial.dll
- Boxing / Unboxing Nullable Types – Why this implementation?
- variable scope in statement blocks
- Mono Compiler as a Service (MCS)
- How to decide between MonoTouch and Objective-C? [closed]
- How to get all sections by name in the sectionGroup applicationSettings in .Net 2.0
- Where is the .NET JIT-compiled code cached?
- Why value-types are stored onto Stacks?
- How to migrate a .NET Windows Service application to Linux using mono?