# OpcClient.ReadNodeValues Method

> Reference: Reads the Value attributes of the nodes 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 |
|---|---|
| [ReadNodeValues(IEnumerable&lt;IOpcNodeValue&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcclient/readnodevalues#readnodevalues-system-collections-generic-ienumerable-of-opc-uafx-iopcnodevalue)<span class="api-meta">since v2.8</span> | Reads the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attributes of the `nodes` specified. |
| [ReadNodeValues(params IOpcNodeValue\[\])](#readnodevalues-opc-uafx-iopcnodevalue-array)<span class="api-meta">since v2.8</span> | Reads the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attributes of 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 |
|---|---|
| [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception) | The read service is currently not supported, especially using the `nodes` specified. |
| [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). |

## ReadNodeValues(IEnumerable&lt;IOpcNodeValue&gt;)

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

Reads the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attributes of the `nodes` specified.

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

```csharp
public IEnumerable<OpcValue> ReadNodeValues(IEnumerable<IOpcNodeValue> nodes)
```

</div>

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

```vbnet
Public Function ReadNodeValues(
    nodes As IEnumerable(Of IOpcNodeValue)) As IEnumerable(Of OpcValue)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/)&gt; | A sequence of [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) instances which representing the nodes its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) is to be read. |

**Returns**

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

A sequence of [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) instances its number and order of items matches the number and order of items in the `nodes` sequence. There is for each entry in `nodes` one entry which stores the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) of the node described by the entry in `nodes` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` sequence or one of its items is a null reference (Nothing in Visual Basic). |

## ReadNodeValues(params IOpcNodeValue\[\])

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

Reads the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attributes of the `nodes` specified.

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

```csharp
public IEnumerable<OpcValue> ReadNodeValues(params IOpcNodeValue[] nodes)
```

</div>

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

```vbnet
Public Function ReadNodeValues(
    ParamArray nodes As IOpcNodeValue()) As IEnumerable(Of OpcValue)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `nodes` | params [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/)[] | An array of [IOpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnodevalue/) instances which representing the nodes its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) is to be read. |

**Returns**

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

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `nodes` array or one of its items is a null reference (Nothing in Visual Basic). |
