ServiceCollection.Item[] 属性

定义

按名称或索引号获取集合中的 Service 对象。

重载

Item[Int32]

按索引号获取集合中的 Service 对象。

Item[String]

按名称获取集合中的 Service 对象。

Item[Int32]

按索引号获取集合中的 Service 对象。

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

参数

index
Int32

一个 Int32 值,该值指定 Service 对象在 ServiceCollection 集合中的位置。

属性值

表示ServiceSQL Server服务的对象值。

示例

使用集合

适用于

Item[String]

按名称获取集合中的 Service 对象。

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

参数

name
String

一个 String 值,该值指定 Service 集合中的 ServiceCollection 对象的名称。

属性值

表示ServiceSQL Server服务的对象值。

示例

使用集合

适用于