OSPlatform.Create(String) 方法

定义

创建新的 OSPlatform 实例。

public:
 static System::Runtime::InteropServices::OSPlatform Create(System::String ^ osPlatform);
public static System.Runtime.InteropServices.OSPlatform Create(string osPlatform);
static member Create : string -> System.Runtime.InteropServices.OSPlatform
Public Shared Function Create (osPlatform As String) As OSPlatform

参数

osPlatform
String

此实例表示的平台的名称。

返回

表示操作系统的对象 osPlatform

例外

osPlatform 是空字符串。

osPlatformnull

注解

Create使用以下字符串调用方法等效于从相应的静态属性检索OSPlatform对象:

osPlatform 字符串 OSPlatform 属性
“FREEBSD” OSPlatform.FreeBSD
“LINUX” OSPlatform.Linux
“OSX” OSPlatform.OSX
“WINDOWS” OSPlatform.Windows

适用于