Name

MulticastDelegate

Synopsis

This is the base class for multicast delegates. Multicast delegates are identical to normal delegates, except that their invocation list can hold more than one method at a time. You can use Delegate.Combine() to add a method to the list and Delegate.Remove() to remove one. When you invoke a multicast delegate, the methods are invoked synchronously one after the other. An error in one method can prevent the delegate from calling the other methods in its list.

Multicast delegates can also be invoked asynchronously, meaning that the entire call chain is invoked serially by a single thread out of the system thread pool. If it is desirable to invoke each delegate in the chain on its own asynchronous thread instead, then use GetInvocationList() to obtain the list of delegates and asynchronously invoke each one.

Public MustInherit Class MulticastDelegate : Inherits Delegate
' Protected Constructors
   Protected Sub New(ByVal target As Object, 
        ByVal method As String) 
   Protected Sub New(ByVal target As Type, 
        ByVal method As String) 
' Public Shared Methods
   Public Shared Boolean operator Sub !=(
        ByVal d1 As MulticastDelegate, 
        ByVal d2 As MulticastDelegate) 
   Public Shared Boolean operator Sub ==(
        ByVal d1 As MulticastDelegate, 
        ByVal d2 As MulticastDelegate) 
' Public Instance Methods
   Overrides NotOverridable Public Function Equals(
        ByVal obj As Object) As Boolean  
   Overrides NotOverridable Public Function GetHashCode( ) As Integer Overrides NotOverridable Public Function ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.