# IOpcDeleteReferencesService Members

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

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">IOpcDeleteReferencesService</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;OpcDeleteReferencesResponse, OpcDeleteReferencesRequest&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcservice-2/members).

## Methods

### DeleteReferences

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

| Overload | Description |
|---|---|
| [DeleteReferences(IEnumerable&lt;OpcDeleteReference&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcdeletereferencesservice/members#deletereferences-system-collections-generic-ienumerable-of-opc-uafx-opcdeletereference)<span class="api-meta">since v2.7</span> | Deletes one or more references of existing nodes in the address space hierarchy using the `commands` specified. |
| [DeleteReferences(params OpcDeleteReference\[\])](#deletereferences-opc-uafx-opcdeletereference-array)<span class="api-meta">since v2.7</span> | Deletes one or more references of existing nodes in 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 reference 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). |

#### DeleteReferences(IEnumerable&lt;OpcDeleteReference&gt;)

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

Deletes one or more references of existing nodes in the address space hierarchy using the `commands` specified.

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

```csharp
OpcStatusCollection DeleteReferences(IEnumerable<OpcDeleteReference> commands)
```

</div>

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

```vbnet
Function DeleteReferences(
    commands As IEnumerable(Of OpcDeleteReference)) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcDeleteReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdeletereference/)&gt; | A sequence of [OpcDeleteReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdeletereference/) 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 |
|---|---|
| [BadSourceNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsourcenodeidinvalid) | For more details see [BadSourceNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsourcenodeidinvalid). |
| [BadReferenceTypeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badreferencetypeidinvalid) | For more details see [BadReferenceTypeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badreferencetypeidinvalid). |
| [BadServerIndexInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badserverindexinvalid) | The server index is not valid. |
| [BadTargetNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtargetnodeidinvalid) | For more details see [BadTargetNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtargetnodeidinvalid). |
| [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). |

#### DeleteReferences(params OpcDeleteReference\[\])

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

Deletes one or more references of existing nodes in the address space hierarchy using the `commands` specified.

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

```csharp
OpcStatusCollection DeleteReferences(params OpcDeleteReference[] commands)
```

</div>

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

```vbnet
Function DeleteReferences(
    ParamArray commands As OpcDeleteReference()) As OpcStatusCollection
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `commands` | params [OpcDeleteReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdeletereference/)[] | An array of [OpcDeleteReference](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdeletereference/) 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 |
|---|---|
| [BadSourceNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsourcenodeidinvalid) | For more details see [BadSourceNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badsourcenodeidinvalid). |
| [BadReferenceTypeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badreferencetypeidinvalid) | For more details see [BadReferenceTypeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badreferencetypeidinvalid). |
| [BadServerIndexInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badserverindexinvalid) | The server index is not valid. |
| [BadTargetNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtargetnodeidinvalid) | For more details see [BadTargetNodeIdInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtargetnodeidinvalid). |
| [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). |
