# OpcClient.UnregisterNode Method

> Reference: Unregisters a node to not longer optimize its node access using the command specified.

<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">2 overloads · since v2.8</span>

| Overload | Description |
|---|---|
| [UnregisterNode(OpcUnregisterNode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/unregisternode#unregisternode-opc-uafx-opcunregisternode)<span class="api-meta">since v2.8</span> | Unregisters a node to not longer optimize its node access using the `command` specified. |
| [UnregisterNode(OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/unregisternode#unregisternode-opc-uafx-opcnodeid)<span class="api-meta">since v2.8</span> | Unregisters a node to not longer optimize its node access using the identifier of the node. |

**Exceptions (all overloads)**

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

## UnregisterNode(OpcUnregisterNode)

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

Unregisters a node to not longer optimize its node access using the `command` specified.

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

```csharp
public void UnregisterNode(OpcUnregisterNode command)
```

</div>

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

```vbnet
Public Sub UnregisterNode(command As OpcUnregisterNode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `command` | [OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/) | The [OpcUnregisterNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcunregisternode/) instance to process. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `command` 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 `command` 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). |

## UnregisterNode(OpcNodeId)

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

Unregisters a node to not longer optimize its node access using the identifier of the node. The node access to a once unregistered node is not longer optimized.

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

```csharp
public void UnregisterNode(OpcNodeId nodeId)
```

</div>

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

```vbnet
Public Sub UnregisterNode(nodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodeId` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the node to unregister can be identified. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `nodeId` 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 `nodeId` 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). |
