How can I detect if am running in Mono? Having code that depends on the underlying runtime is considered to be bad coding style, but sometimes such code is necessary to work around runtime bugs. The supported way of detecting Mono is: using System; class Program {static void Main () { Type t = Type.GetType ("Mono.Runtime"); if (t != null) Console.WriteLine ("You are running with the Mono VM"); else Console.WriteLine ("You are running something else"); } }
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
dcterms:subject | |
abstract |
|