# OpcAddNodesResponse Members

> Reference: Represents the response of the AddNodes service of OPC UA, which provides the result and the identifier of each node added.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcAddNodesResponse</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 [OpcServiceResponse&lt;OpcAddNodeResultCollection&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse-1/members), [OpcServiceResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse/members).

## Constructors

### OpcAddNodesResponse

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

| Overload | Description |
|---|---|
| [OpcAddNodesResponse(IOpcServiceResponseHeader)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/members#opcaddnodesresponse-opc-uafx-services-iopcserviceresponseheader)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header`, no results and no diagnostic information. |
| [OpcAddNodesResponse(IOpcServiceResponseHeader, OpcAddNodeResultCollection)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/members#opcaddnodesresponse-opc-uafx-services-iopcserviceresponseheader-opc-uafx-opcaddnoderesultcollection)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header` and `results` and no diagnostic information. |
| [OpcAddNodesResponse(IOpcServiceResponseHeader, OpcAddNodeResultCollection, DiagnosticInfoCollection)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/members#opcaddnodesresponse-opc-uafx-services-iopcserviceresponseheader-opc-uafx-opcaddnoderesultcollection-opc-ua-diagnosticinfocollection)<span class="api-meta">since v2.7</span> | Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header`, `results` and `diagnosticInfos`. |

**Exceptions (all overloads)**

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

#### OpcAddNodesResponse(IOpcServiceResponseHeader)

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

Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header`, no results and no diagnostic information.

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

```csharp
public OpcAddNodesResponse(IOpcServiceResponseHeader header)
```

</div>

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

```vbnet
Public Sub New(header As IOpcServiceResponseHeader)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |

#### OpcAddNodesResponse(IOpcServiceResponseHeader, OpcAddNodeResultCollection)

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

Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header` and `results` and no diagnostic information.

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

```csharp
public OpcAddNodesResponse(
    IOpcServiceResponseHeader header,
    OpcAddNodeResultCollection results)
```

</div>

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

```vbnet
Public Sub New(
    header As IOpcServiceResponseHeader,
    results As OpcAddNodeResultCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |
| `results` | [OpcAddNodeResultCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnoderesultcollection/) | The results of the operations in the order of the commands of the request, or a null reference (Nothing in Visual Basic) for none. |

#### OpcAddNodesResponse(IOpcServiceResponseHeader, OpcAddNodeResultCollection, DiagnosticInfoCollection)

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

Initializes a new instance of the [OpcAddNodesResponse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcaddnodesresponse/) class using the specified `header`, `results` and `diagnosticInfos`.

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

```csharp
public OpcAddNodesResponse(
    IOpcServiceResponseHeader header,
    OpcAddNodeResultCollection results,
    DiagnosticInfoCollection diagnosticInfos)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Sub New(
    header As IOpcServiceResponseHeader,
    results As OpcAddNodeResultCollection,
    diagnosticInfos As DiagnosticInfoCollection)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `header` | [IOpcServiceResponseHeader](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.iopcserviceresponseheader/) | The header of the response. |
| `results` | [OpcAddNodeResultCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnoderesultcollection/) | The results of the operations in the order of the commands of the request, or a null reference (Nothing in Visual Basic) for none. |
| `diagnosticInfos` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DiagnosticInfoCollection">DiagnosticInfoCollection</abbr> | The diagnostic information of the operations, or a null reference (Nothing in Visual Basic) for none. |

## Methods

### GetResults

<span class="api-meta">override · since v2.19</span>

Retrieves the results of the operations of the service.

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

```csharp
public override IEnumerable<OpcResult> GetResults()
```

</div>

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

```vbnet
Public Overrides Function GetResults() As IEnumerable(Of OpcResult)
```

</div>

**Returns**

[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/)&gt;

A sequence of the [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) of each node to add in the order of the commands of the request.

**Overrides**

[GetResults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcserviceresponse/members#getresults)
