# OpcReadOnlyNamespaceCollection Members

> Reference: Provides a read-only collection of OpcNamespace instances.

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

Inherits members from [ReadOnlyCollection&lt;OpcNamespace&gt;](https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.readonlycollection-1).

## Constructors

### OpcReadOnlyNamespaceCollection

Initializes a new instance of the [OpcReadOnlyNamespaceCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadonlynamespacecollection/) class that is a read-only wrapper around the specified `list`.

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

```csharp
public OpcReadOnlyNamespaceCollection(IList<OpcNamespace> list)
```

</div>

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

```vbnet
Public Sub New(list As IList(Of OpcNamespace))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `list` | [IList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)&lt;[OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/)&gt; | The [IList&lt;T&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1) of [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) instances to wrap. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `list` is a null reference (Nothing in Visual Basic). |

## Methods

### Resolve

<span class="api-meta">since v2.12</span>

Resolves another namespace using the information in the `source` specified.

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

```csharp
public OpcNamespace Resolve(OpcNamespace source)
```

</div>

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

```vbnet
Public Function Resolve(source As OpcNamespace) As OpcNamespace
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `source` | [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) | The [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) its [Index](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/members#index) (if specified) or its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/members#value) (if specified) is used to determine the according namespace known. |

**Returns**

[OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/)

The [OpcNamespace](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnamespace/) instance known using the index or value of the `source` specified; otherwise a null reference (Nothing in Visual Basic).

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `source` is a null reference (Nothing in Visual Basic). |

**Implements**

[Resolve](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnamespaceresolver/members#resolve)

### ResolveIndex

<span class="api-meta">since v2.12</span>

Resolves the unique identifier of the namespace specified by the `namespaceValue`.

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

```csharp
public int ResolveIndex(string namespaceValue)
```

</div>

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

```vbnet
Public Function ResolveIndex(namespaceValue As String) As Integer
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `namespaceValue` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The string representation of the namespace its unique numeric identifier is to be resolved. |

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The unique numeric identifier of the namespace which could be looked up using the `namespaceValue` specified; otherwise -1 if there is no known namespace which matches the `namespaceValue` specified.

**Implements**

[ResolveIndex](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnamespaceresolver/members#resolveindex)

### ResolveValue

<span class="api-meta">since v2.12</span>

Resolves the [string](https://learn.microsoft.com/dotnet/api/system.string)-based representation of the namespace which can be identified using the `namespaceIndex` specified.

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

```csharp
public string ResolveValue(int namespaceIndex)
```

</div>

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

```vbnet
Public Function ResolveValue(namespaceIndex As Integer) As String
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `namespaceIndex` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The numeric unique identifier of the namespace its [string](https://learn.microsoft.com/dotnet/api/system.string)-based representation is to be resolved. |

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The [string](https://learn.microsoft.com/dotnet/api/system.string)-based representation of the namespace which could be looked up using the `namespaceIndex` specified; otherwise a null reference (Nothing in Visual Basic).

**Implements**

[ResolveValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnamespaceresolver/members#resolvevalue)
