RuntimeTypeHandle.Equality 运算符

定义

指示某个对象与 RuntimeTypeHandle 结构是否相等。Indicates whether an object and a RuntimeTypeHandle structure are equal.

重载

Equality(Object, RuntimeTypeHandle)

指示某个对象与 RuntimeTypeHandle 结构是否相等。Indicates whether an object and a RuntimeTypeHandle structure are equal.

Equality(RuntimeTypeHandle, Object)

指示 RuntimeTypeHandle 结构与某个对象是否相等。Indicates whether a RuntimeTypeHandle structure is equal to an object.

Equality(Object, RuntimeTypeHandle)

指示某个对象与 RuntimeTypeHandle 结构是否相等。Indicates whether an object and a RuntimeTypeHandle structure are equal.

public:
 static bool operator ==(System::Object ^ left, RuntimeTypeHandle right);
public static bool operator == (object left, RuntimeTypeHandle right);
static member ( = ) : obj * RuntimeTypeHandle -> bool
Public Shared Operator == (left As Object, right As RuntimeTypeHandle) As Boolean

参数

left
Object

要与 right 比较的对象。An object to compare to right.

right
RuntimeTypeHandle

要与 RuntimeTypeHandle 比较的 left 结构。A RuntimeTypeHandle structure to compare to left.

返回

如果 trueleft 结构并且与 RuntimeTypeHandle 相等,则为 right;否则为 falsetrue if left is a RuntimeTypeHandle structure and is equal to right; otherwise, false.

注解

使用此运算符比较 RuntimeTypeHandle 类型的两个变量会导致编译时出现不明确的重载决策错误。Using this operator to compare two variables of type RuntimeTypeHandle causes an ambiguous overload resolution error when compiled. 请改用 Equals 方法。Use the Equals method instead.

此运算符的等效方法是 RuntimeTypeHandle.Equals(Object)The equivalent method for this operator is RuntimeTypeHandle.Equals(Object).

Equality(RuntimeTypeHandle, Object)

指示 RuntimeTypeHandle 结构与某个对象是否相等。Indicates whether a RuntimeTypeHandle structure is equal to an object.

public:
 static bool operator ==(RuntimeTypeHandle left, System::Object ^ right);
public static bool operator == (RuntimeTypeHandle left, object right);
static member ( = ) : RuntimeTypeHandle * obj -> bool
Public Shared Operator == (left As RuntimeTypeHandle, right As Object) As Boolean

参数

left
RuntimeTypeHandle

要与 RuntimeTypeHandle 比较的 right 结构。A RuntimeTypeHandle structure to compare to right.

right
Object

要与 left 比较的对象。An object to compare to left.

返回

如果 trueright 并且与 RuntimeTypeHandle 相等,则为 left;否则为 falsetrue if right is a RuntimeTypeHandle and is equal to left; otherwise, false.

注解

使用此运算符比较 RuntimeTypeHandle 类型的两个变量会导致编译时出现不明确的重载决策错误。Using this operator to compare two variables of type RuntimeTypeHandle causes an ambiguous overload resolution error when compiled. 请改用 Equals 方法。Use the Equals method instead.

此运算符的等效方法是 RuntimeTypeHandle.Equals(Object)>。The equivalent method for this operator is RuntimeTypeHandle.Equals(Object)>.

适用于