# OpcMonitoredItemCollection Class

> Reference: Represents a collection of OpcMonitoredItem instances keyed by their ClientID.

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.client">Opc.UaFx.Client</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcMonitoredItemCollection Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Represents a collection of [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/) instances keyed by their [ClientID](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/members#clientid).

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public class OpcMonitoredItemCollection : KeyedCollection<long, OpcMonitoredItem>
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Class OpcMonitoredItemCollection
    Inherits KeyedCollection(Of Long, OpcMonitoredItem)
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [Collection](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1)&lt;[OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/)&gt; → [KeyedCollection](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.keyedcollection-2)&lt;[Int64](https://learn.microsoft.com/dotnet/api/system.int64), [OpcMonitoredItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditem/)&gt; → **OpcMonitoredItemCollection**

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a href="../opc.uafx.client.opcmonitoreditem/">OpcMonitoredItem</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a href="../opc.uafx.client.opcmonitoreditem/">OpcMonitoredItem</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a href="../opc.uafx.client.opcmonitoreditem/">OpcMonitoredItem</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;<a href="../opc.uafx.client.opcmonitoreditem/">OpcMonitoredItem</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a href="../opc.uafx.client.opcmonitoreditem/">OpcMonitoredItem</a>&gt;</li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcMonitoredItemCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditemcollection/members#opcmonitoreditemcollection) | Initializes a new instance of the OpcMonitoredItemCollection class. |

## Methods

| Name | Description |
|---|---|
| [GetKeyForItem](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcmonitoreditemcollection/members#getkeyforitem)<span class="api-meta">protected · override</span> | Gets the key of the `item` specified. |

Inherits members from [KeyedCollection&lt;Int64, OpcMonitoredItem&gt;](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.keyedcollection-2), [Collection&lt;OpcMonitoredItem&gt;](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1).

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
