dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Framework Interop on Mac OS/X & platform issues


From: Rhys Weatherley
Subject: Re: [DotGNU]Framework Interop on Mac OS/X & platform issues
Date: Sat, 20 Sep 2003 07:07:21 +1000
User-agent: KMail/1.4.3

Hi all,

The CVS version of pnetlib has now been modified to return the autoconf 
platform identifier.  e.g. the following code:

    String os = Environment.OSVersion.ToString();

will return a string such as the following:

    Unix [i686-pc-linux-gnu] 5.1.2600.0

The stuff between square brackets is the autoconf identifier for the platform 
the runtime engine was compiled for.  This is only reported for 
"PlatformID.Unix".  Under Windows, it will return something like this, for 
backwards compatibility:

    Microsoft Windows NT 5.1.2600.0

The version number (5.1.2600.0) is a fake, to fool Windows-specific C# 
programs.  It does not indicate the Unix operating system version.  If the 
Unix OS version is important, it will appear in the autoconf platform 
identifier.

Note: C# code should normally be written to be 100% portable with no use of 
platform-specific code or PInvoke.  The platform identifier should only be 
used when there is no other way to achieve the task.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]