[Serializable] |
A MulticastDelegate has a linked list of delegates, called an invocation list, consisting of one or more elements. When a multicast delegate is invoked, the delegates in the invocation list are called synchronously in the order in which they appear. If an error occurs during execution of the list then an exception is thrown.
Method (inherited from System.Delegate) |
Read-only See base class member description: System.Delegate.Method Gets the static method represented by the delegate. |
Target (inherited from System.Delegate) |
Read-only See base class member description: System.Delegate.Target Gets the class instance on which the current delegate invokes the instance method. |
Clone (inherited from System.Delegate) |
See base class member description: System.Delegate.Clone Creates a shallow copy of the delegate. |
DynamicInvoke (inherited from System.Delegate) |
See base class member description: System.Delegate.DynamicInvoke Dynamically invokes (late-bound) the method represented by the current delegate. |
Equals | Overridden: Determines whether this multicast delegate and the specified object are equal. |
GetHashCode | Overridden: Returns the hash code for this instance. |
GetInvocationList | Overridden: Returns the invocation list of this multicast delegate, in invocation order. |
GetObjectData | Overridden: Populates a SerializationInfo object with all the data needed to serialize this instance. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
op_Equality | Determines whether two MulticastDelegate objects are equal. |
op_Inequality | Determines whether two MulticastDelegate objects are not equal. |
ctor #1 | Overloaded:.ctor(object target, string method) Initializes a new instance of the MulticastDelegate class. |
ctor #2 | Overloaded:.ctor(Type target, string method) Initializes a new instance of the MulticastDelegate class. |
CombineImpl | Overridden: Combines this Delegate with the specified Delegate to form a new delegate. |
DynamicInvokeImpl | Overridden: Processes the full invocation list. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
GetMethodImpl (inherited from System.Delegate) |
See base class member description: System.Delegate.GetMethodImpl Gets the static method represented by the current delegate. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
RemoveImpl | Overridden: Removes an element from the invocation list of this MulticastDelegate that is equal to the specified delegate. |
Hierarchy:
target
method
target
method
public MethodInfo Method {get;}
|
Exception Type | Condition |
---|---|
MemberAccessException | The caller does not have access to the method represented by the delegate (for example, if the method is private). |
public object Target {get;}
|
If the delegate invokes one or more instance methods, this property returns the target of the last instance method in the invocation list.
public virtual object Clone(); |
A shallow copy creates a new instance of the same type as the original object, and then copies the non-static fields of the original object. If the field is a value type, a bit-by-bit copy of the field is performed. If the field is a reference type, the reference is copied but the referred object is not; therefore, the reference in the original object and the reference in the clone point to the same object. In contrast, a deep copy of an object duplicates everything directly or indirectly referenced by the fields in the object.
follow
args
-or-
null, if the method represented by the current delegate does not require arguments.
An array of objects that are the arguments to pass to the method represented by the current delegate.-or-
null, if the method represented by the current delegate does not require arguments.
Exception Type | Condition |
---|---|
MemberAccessException | The caller does not have access to the method represented by the delegate (for example, if the method is private). -or- The number, order, or type of parameters listed in args is invalid. |
TargetException | The method represented by the delegate is an instance method and the target object is null. -or- The method represented by the delegate is invoked on an object or a class that does not support it. |
TargetInvocationException | One of the encapsulated methods throws an exception. |
args
Exception Type | Condition |
---|---|
MemberAccessException | There is an attempt to invoke a method to which the caller does not have access (that is, a private method). |
ArgumentException | The number, order, or type of parameters is invalid. |
TargetException | An encapsulated method is not static, and the target object is null. -or- There is an attempt to invoke a method on an object or class that does not support the method. |
TargetInvocationException | One of the encapsulated methods throws an exception. |
obj
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.
~MulticastDelegate(); |
public override int GetHashCode(); |
public override Delegate[] GetInvocationList(); |
protected virtual MethodInfo GetMethodImpl(); |
Exception Type | Condition |
---|---|
MemberAccessException | The caller does not have access to the method represented by the delegate (for example, if the method is private). |
public override void GetObjectData( |
info
context
Exception Type | Condition |
---|---|
ArgumentNullException | info is null. |
The context parameter is reserved and is not currently used in the execution of this method.
public Type GetType(); |
protected object MemberwiseClone(); |
public static bool operator ==( |
d1
d2
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.
public static bool operator !=( |
d1
d2
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.
value
public virtual string ToString(); |