Share via


Delegate.Combine Method

Concatenates the invocation lists of two multicast (combinable) delegates.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

 [MethodImplAttribute]
public static Delegate Combine (
         Delegate a,
         Delegate b
)

Parameters

  • a
    The multicast (combinable) delegate whose invocation list comes first.
  • b
    The multicast (combinable) delegate whose invocation list comes last.

Return Value

A new multicast (combinable) delegate with an invocation list that concatenates the invocation lists of a and b, in that order.

-or-

a, if b is a null reference.

-or-

b, if a is a null reference.

-or-

A null reference, if both a and b are null references.

Remarks

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

The Combine method is useful for creating event handlers that call multiple methods each time an event occurs.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

Delegate Class
Delegate Members
System Namespace