Delen via


ObjectEventSet.Add Method (ObjectEventSet, ObjectEvent)

Adds an ObjectEvent object to a ObjectEventSet.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Shared Function Add ( _
    eventSet As ObjectEventSet, _
    anEvent As ObjectEvent _
) As ObjectEventSet
'Usage
Dim eventSet As ObjectEventSet 
Dim anEvent As ObjectEvent 
Dim returnValue As ObjectEventSet 

returnValue = ObjectEventSet.Add(eventSet, _
    anEvent)
public static ObjectEventSet Add(
    ObjectEventSet eventSet,
    ObjectEvent anEvent
)
public:
static ObjectEventSet^ Add(
    ObjectEventSet^ eventSet, 
    ObjectEvent^ anEvent
)
static member Add : 
        eventSet:ObjectEventSet * 
        anEvent:ObjectEvent -> ObjectEventSet
public static function Add(
    eventSet : ObjectEventSet, 
    anEvent : ObjectEvent
) : ObjectEventSet

Parameters

Return Value

Type: Microsoft.SqlServer.Management.Smo.ObjectEventSet
An ObjectEventSet object that contains the added ObjectEvent object.

Examples

Handling SMO Events

See Also

Reference

ObjectEventSet Class

Add Overload

Microsoft.SqlServer.Management.Smo Namespace