ServiceCollection.Item[] Property

Definition

Gets a Service object in the collection by name or by index number.

Overloads

Item[Int32]

Gets a Service object in the collection by index number.

Item[String]

Gets a Service object in the collection by name.

Item[Int32]

Gets a Service object in the collection by index number.

public:
 property Microsoft::SqlServer::Management::Smo::Wmi::Service ^ default[int] { Microsoft::SqlServer::Management::Smo::Wmi::Service ^ get(int index); };
public Microsoft.SqlServer.Management.Smo.Wmi.Service this[int index] { get; }
member this.Item(int) : Microsoft.SqlServer.Management.Smo.Wmi.Service
Default Public ReadOnly Property Item(index As Integer) As Service

Parameters

index
Int32

An Int32 value that specifies the position of the Service object in the ServiceCollection collection.

Property Value

A Service object value that represents a SQL Server service.

Examples

Using Collections

Applies to

Item[String]

Gets a Service object in the collection by name.

public:
 property Microsoft::SqlServer::Management::Smo::Wmi::Service ^ default[System::String ^] { Microsoft::SqlServer::Management::Smo::Wmi::Service ^ get(System::String ^ name); };
public Microsoft.SqlServer.Management.Smo.Wmi.Service this[string name] { get; }
member this.Item(string) : Microsoft.SqlServer.Management.Smo.Wmi.Service
Default Public ReadOnly Property Item(name As String) As Service

Parameters

name
String

A String value that specifies the name of the Service object in the ServiceCollection collection.

Property Value

A Service object value that represents a SQL Server service.

Examples

Using Collections

Applies to