OSPlatform.Equality(OSPlatform, OSPlatform) 运算符
定义
确定两个 OSPlatform 对象是否相等。Determines whether two OSPlatform objects are equal.
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
要比较的第一个对象。The first object to compare.
- right
- OSPlatform
要比较的第二个对象。The second object to compare.
返回
如果 left 和 right 相等,则为 true;否则为 false。true if left and right are equal; otherwise, false.
注解
如果两个 OSPlatform 实例具有相同的名称,则这两个实例相等。Two OSPlatform instances are equal if they have the same name. 对象的名称 OSPlatform 是 osPlatform 传递给该方法的字符串 Create 。The name 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". 方法使用序号比较来确定名称是否相同。The method uses ordinal comparison to determine whether the names are the same.