Share via


ServerMessageEventHandler Delegate

The ServerMessageEventHandler class represents the method that handles the event raised by a server message.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

Syntax

'Declaration
Public Delegate Sub ServerMessageEventHandler ( _
    sender As Object, _
    e As ServerMessageEventArgs _
)
'Usage
Dim instance As New ServerMessageEventHandler(AddressOf HandlerMethod)
public delegate void ServerMessageEventHandler(
    Object sender,
    ServerMessageEventArgs e
)
public delegate void ServerMessageEventHandler(
    Object^ sender, 
    ServerMessageEventArgs^ e
)
type ServerMessageEventHandler = 
    delegate of 
        sender:Object * 
        e:ServerMessageEventArgs -> unit
JScript supports the use of delegates, but not the declaration of new ones.

Parameters

  • sender
    Type: System.Object
    An Object system object value that specifies the object that raised the event.