PeekCompletedEventHandler Delegate

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents the method that will handle the PeekCompleted event of a MessageQueue.

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

type PeekCompletedEventHandler = 
    delegate of 
        sender:Object *
        e:PeekCompletedEventArgs -> unit

Parameters

sender
Type: System.Object

The source of the event, the MessageQueue.

e
Type: System.Messaging.PeekCompletedEventArgs

A PeekCompletedEventArgs that contains the event data.

When you create a PeekCompletedEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see NIB: Events and Delegates.

The following example illustrates how to create an event delegate (PeekCompletedEventHandler) for the event handler (MyPeekCompleted) and associate it with the MessageQueue.PeekCompleted event. The event handler peeks a message and writes its label to the screen.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: