Share via


Session.RemoveTarget Method

Removes the Target object from the session.

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

Syntax

'Declaration
Public Function RemoveTarget ( _
    target As Target _
) As Boolean
'Usage
Dim instance As Session 
Dim target As Target 
Dim returnValue As Boolean 

returnValue = instance.RemoveTarget(target)
public bool RemoveTarget(
    Target target
)
public:
bool RemoveTarget(
    Target^ target
)
member RemoveTarget : 
        target:Target -> bool
public function RemoveTarget(
    target : Target
) : boolean

Parameters

Return Value

Type: System.Boolean
Returns True if the target is successfully removed, otherwise False.

Exceptions

Exception Condition
ArgumentNullException

Parameter target is null.

See Also

Reference

Session Class

Microsoft.SqlServer.Management.XEvent Namespace