[Mono-devel-list] Check whether an app is running on Mono (wasRe: [Mono-patches] mcs/class/corlib/Mono ChangeLog,1.1,NONERuntime.cs,1.2,NONE)

Gert Driesen gert.driesen at pandora.be
Fri May 14 03:43:18 EDT 2004


----- Original Message -----
From: <vladimir at pobox.com>
To: "Gert Driesen" <gert.driesen at pandora.be>
Cc: "Gonzalo Paniagua Javier" <gonzalo at ximian.com>; "Mono Development"
<mono-devel-list at lists.ximian.com>
Sent: Friday, May 14, 2004 9:25 AM
Subject: Re: [Mono-devel-list] Check whether an app is running on Mono
(wasRe: [Mono-patches] mcs/class/corlib/Mono
ChangeLog,1.1,NONERuntime.cs,1.2,NONE)


> Hi,
>
> I've been using System.Environment.OSVersion.Platform for this, e.g.:
>
> if (Environment.OSVersion.Platform == (PlatformID) 128) {
> /* Unix, persumably Mono */
> } else {
> /* MS-land, can check for specific PlatformIDs */
> }

As indicated by your code, this just checks whether your app is running on
unix.  It doesn't tell you anything about the runtime on which your app is
executing.

Thanks,

Gert



More information about the Mono-devel-list mailing list