# OpcNodeValueExtensions Members

> Reference: Provides a set of static (Shared in Visual Basic) methods to perform different OpcClient related tasks using OpcNodeValue<T> instances.

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

## Methods

### Read

<span class="api-meta">static · 2 overloads</span>

| Overload | Description |
|---|---|
| [Read&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#read-t1-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient)<span class="api-meta">static</span> | Reads the value of the value attribute of the node represented by the `node` specified. |
| [Read&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#read-t1-system-collections-generic-ienumerable-of-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient)<span class="api-meta">static</span> | Reads one or more values of one or more value attributes of one or more nodes represented by the `nodes` specified. |

**Known results:** [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), [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid), [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid), [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata), [BadDataEncodingInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodinginvalid), [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported), [BadNotReadable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotreadable), [BadUserAccessDenied](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baduseraccessdenied)

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ObjectDisposedException](https://learn.microsoft.com/dotnet/api/system.objectdisposedexception) | The object has been disposed of. |
| [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), [BadTooManyOperations](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtoomanyoperations), [BadMaxAgeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badmaxageinvalid) and [BadTimestampsToReturnInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtimestampstoreturninvalid). |

#### Read&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient)

<span class="api-meta">static</span>

Reads the value of the value attribute of the node represented by the `node` specified.

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

```csharp
public static T Read<T>(this OpcNodeValue<T> node, OpcClient client)
```

</div>

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

```vbnet
Public Shared Function Read(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to read. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt; | The [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instance to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to read the value attribute of the `node`. |

**Returns**

T

The `T` value read using the `node`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `node` or `client` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The read service is currently not supported, especially using the `node` or `client` specified. |

#### Read&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient)

<span class="api-meta">static</span>

Reads one or more values of one or more value attributes of one or more nodes represented by the `nodes` specified.

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

```csharp
public static T[] Read<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client)
```

</div>

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

```vbnet
Public Shared Function Read(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient) As T()
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of value to read. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt;&gt; | A sequence of [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instances to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to read the value attributes of the `nodes`. |

**Returns**

T[]

A sequence of `T` values read using the `nodes` specified. The number and order of items matches the number and order of items in the `nodes` sequence. There is for each node one entry which stores the value requested.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` sequence, one of its items or `client` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The read service is currently not supported, especially using the `nodes` or `client` specified. |

### Write

<span class="api-meta">static · 5 overloads</span>

| Overload | Description |
|---|---|
| [Write&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#write-t1-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient)<span class="api-meta">static</span> | Writes the value attribute of the `node` specified. |
| [Write&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#write-t1-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient-t0)<span class="api-meta">static</span> | Writes the value attribute of the `node` using the `value` specified. |
| [Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#write-t1-system-collections-generic-ienumerable-of-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient)<span class="api-meta">static</span> | Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` specified. |
| [Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient, IEnumerable&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#write-t1-system-collections-generic-ienumerable-of-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient-system-collections-generic-ienumerable-of-t0)<span class="api-meta">static</span> | Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` using the `values` specified. |
| [Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient, params T\[\])](#write-t1-system-collections-generic-ienumerable-of-opc-uafx-opcnodevalue-of-t0-opc-uafx-client-opcclient-t0-array)<span class="api-meta">static</span> | Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` using the `values` specified. |

**Exceptions (all overloads)**

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

#### Write&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient)

<span class="api-meta">static</span>

Writes the value attribute of the `node` specified.

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

```csharp
public static OpcStatus Write<T>(this OpcNodeValue<T> node, OpcClient client)
```

</div>

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

```vbnet
Public Shared Function Write(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient) As OpcStatus
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` |  |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt; | The [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instance to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to write the value attribute of the `node`. |

**Returns**

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

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the operation for the `node`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `node` or `client` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `node` or `client` specified. |

**Remarks**

Known results for the `node` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [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). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [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). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

#### Write&lt;T&gt;(OpcNodeValue&lt;T&gt;, OpcClient, T)

<span class="api-meta">static</span>

Writes the value attribute of the `node` using the `value` specified.

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

```csharp
public static OpcStatus Write<T>(
    this OpcNodeValue<T> node,
    OpcClient client,
    T value)
```

</div>

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

```vbnet
Public Shared Function Write(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient,
    value As T) As OpcStatus
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` |  |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `node` | [OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt; | The [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instance to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to write the value attribute of the `node` using the `value`. |
| `value` | T | The `T` value to write to the `node`. |

**Returns**

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

An instance of the [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) class which indicates the outcome of the operation for the `node`.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `node` or `client` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `node` or `client` specified. |

**Remarks**

Known results for the `node` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [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). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [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). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

#### Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient)

<span class="api-meta">static</span>

Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` specified.

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

```csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client)
```

</div>

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

```vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient) As OpcStatusCollection
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` |  |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt;&gt; | A sequence of [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instances to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to read the value attributes of the `nodes`. |

**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/) its number and order of items matches the number and order of items in the `nodes`. There is for each node one entry which indicates the outcome of the operation for that node.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` sequence or one of its items or `client` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `nodes` or `client` specified. |

**Remarks**

Known results for the `nodes` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [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). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [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). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

#### Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient, IEnumerable&lt;T&gt;)

<span class="api-meta">static</span>

Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` using the `values` specified.

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

```csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client,
    IEnumerable<T> values)
```

</div>

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

```vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient,
    values As IEnumerable(Of T)) As OpcStatusCollection
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` |  |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt;&gt; | A sequence of [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instances to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to read the value attributes of the `nodes`. |
| `values` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;T&gt; | A sequence of `T` values to write. |

**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/) its number and order of items matches the number and order of items in the `nodes`. There is for each node one entry which indicates the outcome of the operation for that node.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The number of items in `nodes` does not match the number of items in `values`. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` sequence or one of its items, `client` or `values` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `nodes` or `client` specified. |

**Remarks**

Known results for the `nodes` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [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). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [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). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |

#### Write&lt;T&gt;(IEnumerable&lt;OpcNodeValue&lt;T&gt;&gt;, OpcClient, params T\[\])

<span class="api-meta">static</span>

Writes one or more values to one or more value attributes of one or more nodes represented by the `nodes` using the `values` specified.

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

```csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client,
    params T[] values)
```

</div>

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

```vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient,
    ParamArray values As T()) As OpcStatusCollection
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` |  |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/)&lt;T&gt;&gt; | A sequence of [OpcNodeValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/) instances to process. |
| `client` | [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) | The [OpcClient](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/) to use to read the value attributes of the `nodes`. |
| `values` | params T[] | An array of `T` values to write. |

**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/) its number and order of items matches the number and order of items in the `nodes`. There is for each node one entry which indicates the outcome of the operation for that node.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The number of items in `nodes` does not match the number of items in `values`. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` sequence or one of its items, `client` or `values` is a null reference (Nothing in Visual Basic). |
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The write service is currently not supported, especially using the `nodes` or `client` specified. |

**Remarks**

Known results for the `nodes` specified are:

| Status | Description |
|---|---|
| [GoodCompletesAsynchronously](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#goodcompletesasynchronously) | The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly. |
| [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). |
| [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid) | For more details see [BadAttributeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badattributeinvalid). |
| [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid) | For more details see [BadIndexRangeInvalid](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangeinvalid). |
| [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata) | For more details see [BadIndexRangeNoData](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badindexrangenodata). |
| [BadWriteNotSupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badwritenotsupported) | The requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node. |
| [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable) | For more details see [BadNotWritable](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnotwritable). |
| [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). |
| [BadOutOfRange](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badoutofrange) | If a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node. |
| [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch) | For more details see [BadTypeMismatch](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badtypemismatch). |
| [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported) | For more details see [BadDataEncodingUnsupported](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#baddataencodingunsupported). |
| [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication) | For more details see [BadNoCommunication](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/#badnocommunication). |
