共用方式為


Event 建構函式 (Session, String)

Initializes a new instance of the Event class from the parent Package object and the name of the event.

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

語法

'宣告
Public Sub New ( _
    parent As Session, _
    name As String _
)
'用途
Dim parent As Session 
Dim name As String 

Dim instance As New Event(parent, _
    name)
public Event(
    Session parent,
    string name
)
public:
Event(
    Session^ parent, 
    String^ name
)
new : 
        parent:Session * 
        name:string -> Event
public function Event(
    parent : Session, 
    name : String
)

參數

  • name
    型別:System.String
    The fully qualified name of the event as a string.

例外狀況

例外狀況 條件
ArgumentNullException

Parameter name is null.

XEventException

The event name is malformed or wrong.

NullReferenceException

The parent of the session is not set yet.

請參閱

參考

Event 類別

Event 多載

Microsoft.SqlServer.Management.XEvent 命名空間