# IOpcDeleteNodesService Members

> Reference: Defines a specialized IOpcService<TResponse, TRequest> which can be used to delete one or more nodes from the address space hierarchy.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcDeleteNodesService</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.services">Opc.UaFx.Services</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 [IOpcService&lt;OpcDeleteNodesResponse, OpcDeleteNodesRequest&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservice-2/members).

## Methods

### DeleteNodes

<span class="api-meta">2 overloads · since v2.7</span>

| Overload | Description |
|---|---|
| [DeleteNodes(IEnumerable&lt;OpcDeleteNode&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcdeletenodesservice/members#deletenodes-system-collections-generic-ienumerable-of-opc-uafx-opcdeletenode)<span class="api-meta">since v2.7</span> | Deletes one or more nodes from the address space hierarchy using the `commands` specified. |
| [DeleteNodes(params OpcDeleteNode\[\])](#deletenodes-opc-uafx-opcdeletenode-array)<span class="api-meta">since v2.7</span> | Deletes one or more nodes from the address space hierarchy using the `commands` specified. |

**Exceptions (all overloads)**

| 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 delete node 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 [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations). |

#### DeleteNodes(IEnumerable&lt;OpcDeleteNode&gt;)

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

Deletes one or more nodes from the address space hierarchy using the `commands` specified.

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

```csharp
OpcStatusCollection DeleteNodes(IEnumerable<OpcDeleteNode> commands)
```

</div>

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

```vbnet
Function DeleteNodes(
    commands As IEnumerable(Of OpcDeleteNode)) As OpcStatusCollection
```

</div>

**Parameters**

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

**Returns**

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

An instance of the [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) class which contains the information about the outcome of each processed command.

**Remarks**

Known results for the `commands` specified are:

| Status | Description |
|---|---|
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadNoDeleteRights](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeleterights) | For more details see [BadNoDeleteRights](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeleterights). |
| [UncertainReferenceNotDeleted](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#uncertainreferencenotdeleted) | The server was not able to delete all target references. |

#### DeleteNodes(params OpcDeleteNode\[\])

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

Deletes one or more nodes from the address space hierarchy using the `commands` specified.

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

```csharp
OpcStatusCollection DeleteNodes(params OpcDeleteNode[] commands)
```

</div>

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

```vbnet
Function DeleteNodes(
    ParamArray commands As OpcDeleteNode()) As OpcStatusCollection
```

</div>

**Parameters**

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

**Returns**

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

An instance of the [OpcStatusCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscollection/) class which contains the information about the outcome of each processed command.

**Remarks**

Known results for the `commands` specified are:

| Status | Description |
|---|---|
| [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid) | For more details see [BadNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidinvalid). |
| [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown) | For more details see [BadNodeIdUnknown](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeidunknown). |
| [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied) | For more details see [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied). |
| [BadNoDeleteRights](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeleterights) | For more details see [BadNoDeleteRights](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnodeleterights). |
| [UncertainReferenceNotDeleted](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#uncertainreferencenotdeleted) | The server was not able to delete all target references. |
