NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Delegate.Combine (Delegate[])

Combines the invocation lists of an array of multicast Delegate instances.

[Visual Basic]
Overloads Public Shared Function Combine( _
   ByVal delegates() As Delegate _
) As Delegate
[C#]
public static Delegate Combine(
   Delegate[] delegates
);
[C++]
public: static Delegate* Combine(
   Delegate* delegates[]
);
[JScript]
public static function Combine(
   delegates : Delegate[]
) : Delegate;

Parameters

delegates
The array of multicast Delegate instances to combine.

Return Value

A new multicast Delegate with an invocation list that concatenates the invocation lists of the delegates in the delegates array.

a null reference (in Visual Basic Nothing) if delegates is a null reference (Nothing), or if delegates contains zero elements, or if all the entries in delegates are a null reference (Nothing).

Exceptions

Exception Type Condition
ArgumentException Not all the non-null entries in delegates are instances of the same class.
MulticastNotSupportedException One or more non-null entries in delegates are not derive from MulticastDelegate.

Remarks

If the delegates array contains entries that are a null reference (Nothing), those entries are ignored.

The invocation list can contain duplicate entries; that is, entries that refer to the same method on the same object.

See Also

Delegate Class | Delegate Members | System Namespace | Delegate.Combine Overload List | MulticastDelegate | CombineImpl