# OpcNodeValue&lt;T&gt; Class

> Reference: Stores the generic value of the Value attribute associated with a specific node optionally associated with status and timestamp information.

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

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</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">OpcNodeValue&lt;T&gt; Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Stores the generic value of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute associated with a specific node optionally associated with status and timestamp information.

## Syntax

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

```csharp
public class OpcNodeValue<T> : OpcNodeAttribute<T>
```

</div>

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

```vbnet
Public Class OpcNodeValue(Of T)
    Inherits OpcNodeAttribute(Of T)
```

</div>

## Type parameters

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

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) → [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/)&lt;T&gt; → [OpcNodeAttribute](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeattribute-1/)&lt;T&gt; → **OpcNodeValue&lt;T&gt;**

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable">IComparable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;<a href="../opc.uafx.opcnodeattribute-1/">OpcNodeAttribute</a>&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;OpcNodeValue&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;<a href="../opc.uafx.opcvalue-1/">OpcValue</a>&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;<a href="../opc.uafx.opcvalue/">OpcValue</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a href="../opc.uafx.opcnodeattribute-1/">OpcNodeAttribute</a>&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;OpcNodeValue&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a href="../opc.uafx.opcvalue-1/">OpcValue</a>&lt;T&gt;&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;<a href="../opc.uafx.opcvalue/">OpcValue</a>&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iformattable">IFormattable</a></li>
<li><a href="../opc.uafx.iopcnodeattribute/">IOpcNodeAttribute</a></li>
<li><a href="../opc.uafx.iopcnodedescriptor/">IOpcNodeDescriptor</a></li>
<li><a href="../opc.uafx.iopcnodevalue/">IOpcNodeValue</a></li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcNodeValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#opcnodevalue)<span class="api-meta">8 overloads</span> | Initializes a new instance of the OpcNodeValue&lt;T&gt; class with the `nodeId` of the node the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcattribute/#value) attribute represented belongs to. |

## Methods

| Name | Description |
|---|---|
| [CompareTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#compareto)<span class="api-meta">5 overloads</span> | Compares the current OpcNodeValue&lt;T&gt; with the `other`. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#equals)<span class="api-meta">5 overloads</span> | Determines whether the specified `other` is equal to this OpcNodeValue&lt;T&gt;. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this OpcNodeValue&lt;T&gt;. |

## Operators

| Name | Description |
|---|---|
| [Equality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-equality)<span class="api-meta">static</span> | Returns a value indicating whether two instance of OpcNodeValue&lt;T&gt; are equal. |
| [Explicit](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-explicit)<span class="api-meta">static</span> | Converts a OpcNodeValue&lt;T&gt; to an <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> object. |
| [GreaterThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-greaterthan)<span class="api-meta">static</span> | Determines whether the first specified OpcNodeValue&lt;T&gt; object is greater than the second specified OpcNodeValue&lt;T&gt; object. |
| [GreaterThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-greaterthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcNodeValue&lt;T&gt; object is greater than or equal to the second specified OpcNodeValue&lt;T&gt; object. |
| [Inequality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-inequality)<span class="api-meta">static</span> | Returns a value indicating whether two instances of OpcNodeValue&lt;T&gt; are not equal. |
| [LessThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-lessthan)<span class="api-meta">static</span> | Determines whether the first specified OpcNodeValue&lt;T&gt; object is less than the second specified OpcNodeValue&lt;T&gt; object. |
| [LessThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodevalue-1/members#op-lessthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcNodeValue&lt;T&gt; object is less than or equal to the second OpcNodeValue&lt;T&gt; object. |

Inherits members from [OpcNodeAttribute&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeattribute-1/members), [OpcValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/members), [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members).

## Extension methods

| Name | Description |
|---|---|
| [OpcNodeValueExtensions.Read](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#read) | Reads the value of the value attribute of the node represented by the `node` specified. |
| [OpcNodeValueExtensions.Write](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.client.opcnodevalueextensions/members#write) | Writes the value attribute of the `node` specified. |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.8–v2.59 |
