tags:

views:

50

answers:

1

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

+4  A: 

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