CounterSetInstanceCounterDataSet.Item[] 属性

定义

访问集合中的计数器值。Accesses a counter value in the collection.

重载

Item[Int32]

使用指定的计数器标识符来访问集合中的计数器值。Accesses a counter value in the collection by using the specified counter identifier.

Item[String]

使用指定的计数器名称来访问集合中的计数器值。Accesses a counter value in the collection by using the specified counter name.

Item[Int32]

使用指定的计数器标识符来访问集合中的计数器值。Accesses a counter value in the collection by using the specified counter identifier.

public:
 property System::Diagnostics::PerformanceData::CounterData ^ default[int] { System::Diagnostics::PerformanceData::CounterData ^ get(int counterId); };
public System.Diagnostics.PerformanceData.CounterData this[int counterId] { get; }
member this.Item(int) : System.Diagnostics.PerformanceData.CounterData
Default Public ReadOnly Property Item(counterId As Integer) As CounterData

参数

counterId
Int32

计数器的标识符。Identifier of the counter. 这是在向计数器集中添加计数器时所使用的标识符。This is the identifier you used when you added the counter to the counter set.

属性值

CounterData

计数器数据。The counter data.

注解

在 c # 中实现为索引器。Implemented as an indexer in C#.

适用于

Item[String]

使用指定的计数器名称来访问集合中的计数器值。Accesses a counter value in the collection by using the specified counter name.

public:
 property System::Diagnostics::PerformanceData::CounterData ^ default[System::String ^] { System::Diagnostics::PerformanceData::CounterData ^ get(System::String ^ counterName); };
public System.Diagnostics.PerformanceData.CounterData this[string counterName] { get; }
member this.Item(string) : System.Diagnostics.PerformanceData.CounterData
Default Public ReadOnly Property Item(counterName As String) As CounterData

参数

counterName
String

计数器的名称。Name of the counter. 这是在向计数器集中添加计数器时所使用的名称。This is the name that you used when you added the counter to the counter set.

属性值

CounterData

计数器数据。The counter data.

注解

在 c # 中实现为索引器。Implemented as an indexer in C#.

若要使用此重载,必须使用 CounterSet.AddCounter(Int32, CounterType, String) 方法将计数器添加到计数器集。To use this overload, you must use the CounterSet.AddCounter(Int32, CounterType, String) method to add the counter to the counter set.

适用于