OSPlatform.Create(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个新的 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 是一个空字符串。
osPlatform 为 null。
注解
Create使用以下字符串调用 方法等效于从相应的静态属性检索 OSPlatform 对象:
| osPlatform 字符串 | OSPlatform 属性 |
|---|---|
| “FREEBSD” | OSPlatform.FreeBSD |
| “LINUX” | OSPlatform.Linux |
| “OSX” | OSPlatform.OSX |
| “WINDOWS” | OSPlatform.Windows |