RuntimeInformation.IsOSPlatform(OSPlatform) 方法
定义
指示当前应用程序是否正在指定平台上运行。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
参数
- osPlatform
- OSPlatform
一个平台。A platform.
返回
如果当前应用正在指定平台上运行,则为 true;否则为 false。true if the current app is running on the specified platform; otherwise, false.