MulticastDelegate.Equals(Object) 方法

定义

确定此多路广播委托和指定的对象是否相等。Determines whether this multicast delegate and the specified object are equal.

public:
 override bool Equals(System::Object ^ obj);
public override sealed bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides NotOverridable Function Equals (obj As Object) As Boolean

参数

obj
Object

与该实例进行比较的对象。The object to compare with this instance.

返回

Boolean

如果 obj 和此实例具有相同的调用列表,则为 true;否则为 falsetrue if obj and this instance have the same invocation lists; otherwise, false.

例外

无法创建抽象类的实例,或者此成员是使用晚期绑定机制调用的。Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.

注解

如果两个委托不是 null 并且具有完全相同的类型,其调用列表中包含的元素数相同,并且第一个委托的调用列表中的每个元素都等于第二个委托的调用列表中的相应元素,则这两个委托相等。Two delegates are equal if they are not null and are of exactly the same type, their invocation lists contain the same number of elements, and every element in the invocation list of the first delegate is equal to the corresponding element in the invocation list of the second delegate.

如果两个调用列表元素在同一目标实例上调用相同的实例方法,或者它们调用相同的静态方法,则它们是相等的。Two invocation list elements are equal if they invoke the same instance method on the same target instance, or they invoke the same static method.

适用于