Language

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 は空の文字列です。

osPlatform は nullです。

注釈

次の文字列を使用して Create メソッドを呼び出すことは、対応する静的プロパティから OSPlatform オブジェクトを取得することと同じです。

osPlatform 文字列 OSPlatform プロパティ
"FREEBSD" OSPlatform.FreeBSD
"LINUX" OSPlatform.Linux
"OSX" OSPlatform.OSX
"WINDOWS" OSPlatform.Windows

適用対象