[Mono-osx] #define and Operating System Specific Code

Bojan Rajkovic brajkovic at coderinserepeat.com
Wed Oct 12 11:07:39 EDT 2011

On Oct 12, 2011, at 10:52 AM, Andrew Ayre wrote:

> Hi, where can I find a list of compiler defines that Mono provides to
> identify the current operating system?
> Thanks, Andy
> -- 
> Andy
> PGP Key ID: 0xDC1B5864

Hi Andy,

The answer is you don't. The Mono compiler does not provide any defines to identify the current operating system. Depending on what you need to do, you may want to use something like Environment.OperatingSystem, or if you need to make a distinction between OS X and Linux/Unix, go deeper and P/Invoke uname(2). Why exactly do you need to differentiate between the OSes?


More information about the Mono-osx mailing list