ServerMessageEventHandler 委派
The ServerMessageEventHandler class represents the method that handles the event raised by a server message.
命名空間: Microsoft.SqlServer.Management.Common
組件: Microsoft.SqlServer.ConnectionInfo (在 Microsoft.SqlServer.ConnectionInfo.dll 中)
語法
'宣告
Public Delegate Sub ServerMessageEventHandler ( _
sender As Object, _
e As ServerMessageEventArgs _
)
'用途
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 支援委託的使用,但不支援新委託的宣告。
參數
- sender
型別:System. . :: . .Object
An Object system object value that specifies the object that raised the event.
- e
型別:Microsoft.SqlServer.Management.Common. . :: . .ServerMessageEventArgs
An ServerMessageEventArgs value that specifies the arguments passed to the event handler.