Skip to content

Instantly share code, notes, and snippets.

@mauricio
Created March 15, 2012 12:49
Show Gist options
  • Save mauricio/2044034 to your computer and use it in GitHub Desktop.
Save mauricio/2044034 to your computer and use it in GitHub Desktop.
using System;
class Program {
static void Main ()
{
int p = (int) Environment.OSVersion.Platform;
if ((p == 4) || (p == 6) || (p == 128)) {
Console.WriteLine ("Running on Unix");
} else {
Console.WriteLine ("NOT running on Unix");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment