I need to use .NET or MONO for C#/F# programming. How do I know my C#/F# code is running on what platform?
Asked
Active
Viewed 427 times
1 Answers
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