RuntimeInformation.IsOSPlatform(OSPlatform) Method

Definition

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

public static bool IsOSPlatform (System.Runtime.InteropServices.OSPlatform osPlatform);
Parameters
osPlatform
OSPlatform

A platform.

Returns

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

Applies to