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.

傳回

如果 true 和這個執行個體 (Instance) 具有相同的引動過程清單,則為 obj,否則為 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.

安全性

ReflectionPermission
透過 InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])的機制叫用晚期繫結時。when invoked late-bound through mechanisms such as InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]). 相關聯的列舉: MemberAccessAssociated enumeration: MemberAccess

適用於