RuntimeInformation.IsOSPlatform(OSPlatform) 方法

定義

指出目前的應用程式是否正在指定的平台上執行。

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

參數

osPlatform
OSPlatform

平台。

傳回

如果目前的應用程式正在指定的平台上執行,則為 true;否則為 false

適用於