共用方式為


ServerEvent 事件

Specifies the event raised when an event occurs in Login object and the user has subscribed to the event from that object instance.

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

語法

'宣告
Public Event ServerEvent As ServerEventHandler
'用途
Dim instance As LoginEvents
Dim handler As ServerEventHandler

AddHandler instance.ServerEvent, handler
public event ServerEventHandler ServerEvent
public:
 event ServerEventHandler^ ServerEvent {
    void add (ServerEventHandler^ value);
    void remove (ServerEventHandler^ value);
}
member ServerEvent : IEvent<ServerEventHandler,
    ServerEventArgs>
JScript 支援事件的使用,但不支援新事件的宣告。