[Mono-list] Detecting if platform is Mac

Erik Ylvisaker eylvisaker at physics.ucdavis.edu
Wed Dec 31 14:53:55 EST 2008


Apparently in .NET 3.5 Microsoft added two members to the 
System.PlatformID type, called Xbox and MacOSX.  Is there any support in 
Mono for these?  Of course, I don't care about the Xbox value I am just 
interested in being able to detect whether my code is running on MacOS 
or Linux.

Otherwise, is there another recommended way to detect if running on 
MacOS?  Currently we are spawning uname and checking to see if the 
output is "Darwin".  This works, but I don't know if there's a better way.


More information about the Mono-list mailing list