[Mono-list] Reliable OS identification on Mono

Marc Glenn mjamon at ntsp.nec.co.jp
Tue Sep 23 02:01:09 EDT 2008


You can use a condition statement like this.

*if(System.Environment.OSVersion.Platform == PlatformID.Unix)

**Here is the link to the Mono API:*

However, I can't find a way to check if its in MAC.

Hope this helps,

Marc Glenn

Vladislav Rastrusny wrote:
> Hello.
> Is there a way to reliably determine OS, application is running on in Mono?
> My application needs to access files of some external application
> (also multiplatform) and those files are located in different places
> depending on OS.
> On Windows it is under ApplicationData, on Linux under /home/user/app
> and on MacOS... I don't know ;) Never installed it.
> Thanks in advance.
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080923/4c83d0fc/attachment-0001.html 

More information about the Mono-list mailing list