This documentation is archived and is not being maintained.

PlatformID Enumeration

Identifies the operating system, or platform, supported by an assembly.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

type PlatformID

Member nameDescription
Supported by the XNA FrameworkWin32SThe operating system is Win32s. Win32s is a layer that runs on 16-bit versions of Windows to provide access to 32-bit applications.
Supported by the XNA FrameworkWin32WindowsThe operating system is Windows 95 or Windows 98.
Supported by the XNA FrameworkWin32NTThe operating system is Windows NT or later.
Supported by the XNA FrameworkWinCEThe operating system is Windows CE.
Supported by the XNA FrameworkUnixThe operating system is Unix.
Supported by the XNA FrameworkXboxThe development platform is Xbox 360.
MacOSXThe operating system is Macintosh.

Use the Environment.OSVersion and OperatingSystem.Platform properties to obtain the PlatformID enumeration for the currently executing operating system or development platform. Use the PlatformID enumeration to help determine whether the current operating system or development platform supports your application.

The following example demonstrates using the PlatformID class to identify the currently executing operating system.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.