# OpcClient.UnregisterNodes Method

> Reference: Unregisters one or more nodes to not longer optimize their node access using the specified commands.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcClient</a></dd>
<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">OpcClient Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

<span class="api-meta">4 overloads · since v2.8</span>

| Overload | Description |
|---|---|
| [UnregisterNodes(IEnumerable&lt;OpcUnregisterNode&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/unregisternodes#unregisternodes-system-collections-generic-ienumerable-of-opc-uafx-opcunregisternode)<span class="api-meta">since v2.8</span> | Unregisters one or more nodes to not longer optimize their node access using the specified `commands`. |
| [UnregisterNodes(params OpcUnregisterNode\[\])](#unregisternodes-opc-uafx-opcunregisternode-array)<span class="api-meta">since v2.8</span> | Unregisters one or more nodes to not longer optimize their node access using the specified `commands`. |
| [UnregisterNodes(IEnumerable&lt;OpcNodeId&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/unregisternodes#unregisternodes-system-collections-generic-ienumerable-of-opc-uafx-opcnodeid)<span class="api-meta">since v2.8</span> | Unregisters one or more nodes to not longer optimize their node access using the identifiers of the nodes. |
| [UnregisterNodes(params OpcNodeId\[\])](#unregisternodes-opc-uafx-opcnodeid-array)<span class="api-meta">since v2.8</span> | Unregisters one or more nodes to not longer optimize their node access using the identifiers of the nodes. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |

## UnregisterNodes(IEnumerable&lt;OpcUnregisterNode&gt;)

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

Unregisters one or more nodes to not longer optimize their node access using the specified `commands`.

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

```csharp
public void UnregisterNodes(IEnumerable<OpcUnregisterNode> commands)
```

</div>

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

```vbnet
Public Sub UnregisterNodes(commands As IEnumerable(Of OpcUnregisterNode))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/)&gt; | A sequence of [OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/) instances to process. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The unregister nodes service is currently not supported, especially using the `commands` specified. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyMatches](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymatches). |

## UnregisterNodes(params OpcUnregisterNode\[\])

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

Unregisters one or more nodes to not longer optimize their node access using the specified `commands`.

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

```csharp
public void UnregisterNodes(params OpcUnregisterNode[] commands)
```

</div>

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

```vbnet
Public Sub UnregisterNodes(ParamArray commands As OpcUnregisterNode())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/)[] | An array of [OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/) instances to process. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `commands` sequence or one of its items is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The unregister nodes service is currently not supported, especially using the `commands` specified. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyMatches](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanymatches). |

## UnregisterNodes(IEnumerable&lt;OpcNodeId&gt;)

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

Unregisters one or more nodes to not longer optimize their node access using the identifiers of the nodes. The node access to once unregistered nodes is not longer optimized.

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

```csharp
public void UnregisterNodes(IEnumerable<OpcNodeId> nodeIds)
```

</div>

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

```vbnet
Public Sub UnregisterNodes(nodeIds As IEnumerable(Of OpcNodeId))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeIds` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/)&gt; | A sequence of [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances through that the nodes to unregister can be identified. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | One of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances in `nodeIds` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeIds` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The unregister node service is currently not supported, especially using the parameters specified. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations). |

## UnregisterNodes(params OpcNodeId\[\])

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

Unregisters one or more nodes to not longer optimize their node access using the identifiers of the nodes. The node access to once unregistered nodes is not longer optimized.

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

```csharp
public void UnregisterNodes(params OpcNodeId[] nodeIds)
```

</div>

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

```vbnet
Public Sub UnregisterNodes(ParamArray nodeIds As OpcNodeId())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeIds` | params [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/)[] | An array of [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances through that the nodes to unregister can be identified. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | One of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) instances in `nodeIds` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodeIds` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The unregister node service is currently not supported, especially using the parameters specified. |
| [OpcException](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcexception/) | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: [BadNothingToDo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnothingtodo) and [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations). |
