OSPlatform.ToString 方法

定义

返回此 OSPlatform 实例的字符串表示形式。Returns the string representation of this OSPlatform instance.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

返回

一个表示此 OSPlatform 实例的字符串。A string that represents this OSPlatform instance.

注解

OSPlatform 对象的字符串表示形式是传递到 Create 方法的 osPlatform 字符串。The string representation of an OSPlatform object is the osPlatform string passed to the Create method. 静态 OSPlatform 属性返回的 OSPlatform 对象的名称为 "FREEBSD"、"LINUX"、"OSX" 和 "WINDOWS"。The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS".

适用于