[Mono-list] Determining runtime environment

Jonathan Stowe gellyfish@gellyfish.com
Sun, 31 Mar 2002 11:27:34 +0100 (BST)


On Sat, 30 Mar 2002, John Barnette wrote:

> At 08:26 PM 3/30/2002, Brad Wilson wrote:
> >
> >Is there a way (yet) to tell your operating environment from within C#?
>
>
> Take a look at System.Environment.OSVersion.
>

Is this implemented yet ?  Or am I being totally lame in assuming that:

using System;
using System.Environment;

class TestOS
{
   static void Main()
   {
      OperatingSystem os = System.Environment.OSVersion;
      String plat = (String)os.Platform;
      Console.WriteLine(plat);
   }

}

should do what I expect ?

/J\
-- 
Jonathan Stowe                      |
<http://www.gellyfish.com>          |      This space for rent
                                    |