OSPlatform.Equality(OSPlatform, OSPlatform) 運算子

定義

判斷兩個 OSPlatform 物件是否相等。

public:
 static bool operator ==(System::Runtime::InteropServices::OSPlatform left, System::Runtime::InteropServices::OSPlatform right);
public static bool operator == (System.Runtime.InteropServices.OSPlatform left, System.Runtime.InteropServices.OSPlatform right);
static member ( = ) : System.Runtime.InteropServices.OSPlatform * System.Runtime.InteropServices.OSPlatform -> bool
Public Shared Operator == (left As OSPlatform, right As OSPlatform) As Boolean

參數

left
OSPlatform

要比較的第一個物件。

right
OSPlatform

要比較的第二個物件。

傳回

如果 leftright 相等,則為 true;否則為 false

備註

如果兩 OSPlatform 個實例具有相同的名稱,則兩個實例相等。 物件的名稱 OSPlatformosPlatform 傳遞至 方法的 Create 字串。 靜態 OSPlatform 屬性所傳回的物件名稱 OSPlatform 為 「FREEBSD」、「LINUX」、「OSX」 和 「WINDOWS」。 方法會使用序數比較來判斷名稱是否相同。

適用於