About: Detecting if program is running in Mono   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

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"); } }

AttributesValues
rdfs:label
  • Detecting if program is running in Mono
rdfs:comment
  • 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"); } }
dcterms:subject
abstract
  • 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"); } } Any other hack, such as checking the underlying type of System.Int32 or of other corlib types, is doomed to fail in the future.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software