共用方式為


ServerEventHandler 委派

The ServerEventHandler class represents the event handler that is used to handle server errors.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Delegate Sub ServerEventHandler ( _
    sender As Object, _
    e As ServerEventArgs _
)
'用途
Dim instance As New ServerEventHandler(AddressOf HandlerMethod)
public delegate void ServerEventHandler(
    Object sender,
    ServerEventArgs e
)
public delegate void ServerEventHandler(
    Object^ sender, 
    ServerEventArgs^ e
)
type ServerEventHandler = 
    delegate of 
        sender:Object * 
        e:ServerEventArgs -> unit
JScript 支援委託的使用,但不支援新委託的宣告。

參數