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
- a
Type: System. . :: . .Delegate
The delegate whose invocation list comes first.
- b
Type: System. . :: . .Delegate
The delegate whose invocation list comes last.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.