Share via


TargetServerCollection.ItemById Method

Extracts a member from the TargetServerCollection collection using a system-defined, unique identifier.

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

Syntax

'Declaration
Public Function ItemById ( _
    id As Integer _
) As TargetServer
'Usage
Dim instance As TargetServerCollection 
Dim id As Integer 
Dim returnValue As TargetServer 

returnValue = instance.ItemById(id)
public TargetServer ItemById(
    int id
)
public:
TargetServer^ ItemById(
    int id
)
member ItemById : 
        id:int -> TargetServer
public function ItemById(
    id : int
) : TargetServer

Parameters

Return Value

Type: Microsoft.SqlServer.Management.Smo.Agent.TargetServer
A TargetServer object that has the specified ID value.

Remarks

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Examples

Using Collections

See Also

Reference

TargetServerCollection Class

Microsoft.SqlServer.Management.Smo.Agent Namespace