Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

RuntimeInformation.IsOSPlatform(OSPlatform) Method

Definition

Namespace:
System.Runtime.InteropServices
Assemblies:
netstandard.dll, System.Runtime.dll
Assemblies:
netstandard.dll, System.Runtime.InteropServices.RuntimeInformation.dll
Assembly:
System.Runtime.InteropServices.RuntimeInformation.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs
Source:
RuntimeInformation.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Indicates whether the current application is running on the specified platform.

public:
 static bool IsOSPlatform(System::Runtime::InteropServices::OSPlatform osPlatform);
public static bool IsOSPlatform(System.Runtime.InteropServices.OSPlatform osPlatform);
static member IsOSPlatform : System.Runtime.InteropServices.OSPlatform -> bool
Public Shared Function IsOSPlatform (osPlatform As OSPlatform) As Boolean

Parameters

osPlatform
OSPlatform

A platform.

Returns

true if the current app is running on the specified platform; otherwise, false.

Applies to


Feedback

Was this page helpful?