Class OSPlatform
OSPlatform represents a particular operating system platform
public class OSPlatform
- Inheritance
-
OSPlatform
- Inherited Members
Constructors
OSPlatform(PlatformID, Version)
Construct from a platform ID and version
public OSPlatform(PlatformID platform, Version version)
Parameters
platform
PlatformIDversion
Version
OSPlatform(PlatformID, Version, ProductType)
Construct from a platform ID, version and product type
public OSPlatform(PlatformID platform, Version version, OSPlatform.ProductType product)
Parameters
platform
PlatformIDversion
Versionproduct
OSPlatform.ProductType
Fields
MacOSXPlatformID
Platform ID for MacOSX as defined by .NET and Mono
public static readonly PlatformID MacOSXPlatformID
Field Value
UnixPlatformIDMicrosoft
Platform ID for Unix as defined by .NET
public static readonly PlatformID UnixPlatformIDMicrosoft
Field Value
UnixPlatformIDMono
Platform ID for Unix as defined by Mono
public static readonly PlatformID UnixPlatformIDMono
Field Value
XBoxPlatformID
Platform ID for XBox as defined by .NET and Mono
public static readonly PlatformID XBoxPlatformID
Field Value
Properties
CurrentPlatform
Get the OSPlatform under which we are currently running
public static OSPlatform CurrentPlatform { get; }
Property Value
IsMacOSX
Return true if the platform is MacOSX
public bool IsMacOSX { get; }
Property Value
IsNT3
Return true if the platform is NT 3
public bool IsNT3 { get; }
Property Value
IsNT4
Return true if the platform is NT 4
public bool IsNT4 { get; }
Property Value
IsNT5
Return true if the platform is NT 5
public bool IsNT5 { get; }
Property Value
IsNT6
Return true if the platform is NT 6
public bool IsNT6 { get; }
Property Value
IsNT60
Return true if the platform is NT 6.0
public bool IsNT60 { get; }
Property Value
IsNT61
Return true if the platform is NT 6.1
public bool IsNT61 { get; }
Property Value
IsNT62
Return true if the platform is NT 6.2
public bool IsNT62 { get; }
Property Value
IsNT63
Return true if the platform is NT 6.3
public bool IsNT63 { get; }
Property Value
IsUnix
Return true if this is a Unix or Linux platform
public bool IsUnix { get; }
Property Value
IsVista
Return true if the platform is Vista
public bool IsVista { get; }
Property Value
IsWin2003Server
Return true if the platform is Windows 2003 Server
public bool IsWin2003Server { get; }
Property Value
IsWin2008Server
Return true if the platform is Windows 2008 Server (original or R2)
public bool IsWin2008Server { get; }
Property Value
IsWin2008ServerR1
Return true if the platform is Windows 2008 Server (original)
public bool IsWin2008ServerR1 { get; }
Property Value
IsWin2008ServerR2
Return true if the platform is Windows 2008 Server R2
public bool IsWin2008ServerR2 { get; }
Property Value
IsWin2012Server
Return true if the platform is Windows 2012 Server (original or R2)
public bool IsWin2012Server { get; }
Property Value
IsWin2012ServerR1
Return true if the platform is Windows 2012 Server (original)
public bool IsWin2012ServerR1 { get; }
Property Value
IsWin2012ServerR2
Return true if the platform is Windows 2012 Server R2
public bool IsWin2012ServerR2 { get; }
Property Value
IsWin2K
Return true if the platform is Windows 2000
public bool IsWin2K { get; }
Property Value
IsWin32NT
Return true if the platform is Win32NT
public bool IsWin32NT { get; }
Property Value
IsWin32S
Return true if the platform is Win32S
public bool IsWin32S { get; }
Property Value
IsWin32Windows
Return true if the platform is Win32Windows
public bool IsWin32Windows { get; }
Property Value
IsWin95
Return true if the platform is Windows 95
public bool IsWin95 { get; }
Property Value
IsWin98
Return true if the platform is Windows 98
public bool IsWin98 { get; }
Property Value
IsWinCE
Return true if the platform is Windows CE
public bool IsWinCE { get; }
Property Value
IsWinME
Return true if the platform is Windows ME
public bool IsWinME { get; }
Property Value
IsWinXP
Return true if the platform is Windows XP
public bool IsWinXP { get; }
Property Value
IsWindows
Return true if this is a windows platform
public bool IsWindows { get; }
Property Value
IsWindows10
Return true if the platform is Windows 10
public bool IsWindows10 { get; }
Property Value
IsWindows11
Return true if the platform is Windows 11
public bool IsWindows11 { get; }
Property Value
IsWindows7
Return true if the platform is Windows 7
public bool IsWindows7 { get; }
Property Value
IsWindows8
Return true if the platform is Windows 8
public bool IsWindows8 { get; }
Property Value
IsWindows81
Return true if the platform is Windows 8.1
public bool IsWindows81 { get; }
Property Value
IsWindowsServer10
Return true if the platform is Windows Server. This is named Windows Server 10 to distinguish it from previous versions of Windows Server.
public bool IsWindowsServer10 { get; }
Property Value
IsXbox
Return true if the platform is Xbox
public bool IsXbox { get; }
Property Value
OSDescription
Gets a description for the current OS.
public static string OSDescription { get; }
Property Value
Platform
Get the platform ID of this instance
public PlatformID Platform { get; }
Property Value
Product
Get the Product Type of this instance
public OSPlatform.ProductType Product { get; }
Property Value
Version
Get the Version of this instance
public Version Version { get; }
Property Value
Methods
ToString()
Implemented to use in place of Environment.OSVersion.ToString()
public override string ToString()
Returns
- string
A representation of the platform ID and version in an approximation of the format used by Environment.OSVersion.ToString()