2

I need to use .NET or MONO for C#/F# programming. How do I know my C#/F# code is running on what platform?

prosseek
  • 182,215
  • 215
  • 566
  • 871
  • possible duplicate of [How to detect which .NET runtime is being used (MS vs. Mono)?](http://stackoverflow.com/questions/721161/how-to-detect-which-net-runtime-is-being-used-ms-vs-mono) – JG in SD Oct 29 '14 at 16:16

1 Answers1

6

You shouldn't have to do this. However, if it's really necessary you can check for the type Mono.Runtime. From the Mono FAQ:

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");
Matthew Flaschen
  • 278,309
  • 50
  • 514
  • 539