Share via


Combine Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Concatenates the invocation lists of two delegates.

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

Syntax

'Declaration
Public Shared Function Combine ( _
    a As Delegate, _
    b As Delegate _
) As Delegate
public static Delegate Combine(
    Delegate a,
    Delegate b
)
public:
static Delegate^ Combine(
    Delegate^ a, 
    Delegate^ b
)
static member Combine : 
        a:Delegate * 
        b:Delegate -> Delegate 
public static function Combine(
    a : Delegate, 
    b : Delegate
) : Delegate

Parameters

Return Value

Type: System. . :: . .Delegate
A new delegate with an invocation list that concatenates the invocation lists of a and b in that order. Returns a if b is nullNothingnullptrunita null reference (Nothing in Visual Basic), returns b if a is a null reference, and returns 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 on the same object.

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

.NET Framework Security

See Also

Reference

Delegate Class

System Namespace