# OpcDataVariableNode&lt;T&gt; Members

> Reference: Provides a generic implementation of the OpcDataVariableNode to represent complex data structures expose their information as complex data types, as well as components in the address space.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcDataVariableNode&lt;T&gt;</a></dd>
<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>
</dl>

Inherits members from [OpcDataVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode/members), [OpcVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members), [OpcInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcinstancenode/members), [OpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members).

## Constructors

### OpcDataVariableNode

<span class="api-meta">18 overloads</span>

| Overload | Description |
|---|---|
| [OpcDataVariableNode(OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcname) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified. |
| [OpcDataVariableNode(OpcName, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcname-t0) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value given by `value`. |
| [OpcDataVariableNode(OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcname-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified. |
| [OpcDataVariableNode(OpcName, OpcNodeId, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcname-opc-uafx-opcnodeid-t0) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value given by `value`. |
| [OpcDataVariableNode(IOpcNode, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-iopcnode-opc-uafx-opcname) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified as a child node of the `parent` node given. |
| [OpcDataVariableNode(IOpcNode, OpcName, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-iopcnode-opc-uafx-opcname-t0) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value defined by `value` as a child node of the `parent` node given. |
| [OpcDataVariableNode(IOpcNode, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given. |
| [OpcDataVariableNode(IOpcNode, OpcName, OpcNodeId, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-t0) | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value defined by `value` as a child node of the `parent` node given. |
| [OpcDataVariableNode(BaseDataVariableState&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-ua-basedatavariablestate-of-t0)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class using the `content` as the instance to wrap. |
| [OpcDataVariableNode(BaseDataVariableState&lt;T&gt;, OpcNodeModel)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-ua-basedatavariablestate-of-t0-opc-uafx-opcnodemodel)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class using the `content` as the instance to wrap. |
| [OpcDataVariableNode(OpcNodeModel, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-opcname)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified. |
| [OpcDataVariableNode(OpcNodeModel, OpcName, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-opcname-t0)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value given by `value`. |
| [OpcDataVariableNode(OpcNodeModel, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified. |
| [OpcDataVariableNode(OpcNodeModel, OpcName, OpcNodeId, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-opcname-opc-uafx-opcnodeid-t0)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value given by `value`. |
| [OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified as a child node of the `parent` node given. |
| [OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname-t0)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value defined by `value` as a child node of the `parent` node given. |
| [OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given. |
| [OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId, T)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/members#opcdatavariablenode-opc-uafx-opcnodemodel-opc-uafx-iopcnode-opc-uafx-opcname-opc-uafx-opcnodeid-t0)<span class="api-meta">protected · since v2.50</span> | Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value defined by `value` as a child node of the `parent` node given. |

#### OpcDataVariableNode(OpcName)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified.

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

```csharp
public OpcDataVariableNode(OpcName name)
```

</div>

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

```vbnet
Public Sub New(name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |

#### OpcDataVariableNode(OpcName, T)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value given by `value`.

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

```csharp
public OpcDataVariableNode(OpcName name, T value)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(OpcName, OpcNodeId)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified.

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

```csharp
public OpcDataVariableNode(OpcName name, OpcNodeId id)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |

#### OpcDataVariableNode(OpcName, OpcNodeId, T)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value given by `value`.

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

```csharp
public OpcDataVariableNode(OpcName name, OpcNodeId id, T value)
```

</div>

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

```vbnet
Public Sub New(name As OpcName, id As OpcNodeId, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(IOpcNode, OpcName)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified as a child node of the `parent` node given.

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

```csharp
public OpcDataVariableNode(IOpcNode parent, OpcName name)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |

#### OpcDataVariableNode(IOpcNode, OpcName, T)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value defined by `value` as a child node of the `parent` node given.

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

```csharp
public OpcDataVariableNode(IOpcNode parent, OpcName name, T value)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(IOpcNode, OpcName, OpcNodeId)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given.

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

```csharp
public OpcDataVariableNode(IOpcNode parent, OpcName name, OpcNodeId id)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |

#### OpcDataVariableNode(IOpcNode, OpcName, OpcNodeId, T)

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value defined by `value` as a child node of the `parent` node given.

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

```csharp
public OpcDataVariableNode(IOpcNode parent, OpcName name, OpcNodeId id, T value)
```

</div>

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

```vbnet
Public Sub New(parent As IOpcNode, name As OpcName, id As OpcNodeId, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(BaseDataVariableState&lt;T&gt;)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcDataVariableNode(BaseDataVariableState<T> content)
```

</div>

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

```vbnet
Protected Sub New(content As BaseDataVariableState(Of T))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState</abbr>&lt;T&gt; | The <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState&lt;T&gt;</abbr> to wrap. |

**Exceptions**

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

#### OpcDataVariableNode(BaseDataVariableState&lt;T&gt;, OpcNodeModel)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcDataVariableNode(
    BaseDataVariableState<T> content,
    OpcNodeModel model)
```

</div>

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

```vbnet
Protected Sub New(content As BaseDataVariableState(Of T), model As OpcNodeModel)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState</abbr>&lt;T&gt; | The <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState&lt;T&gt;</abbr> to wrap. |
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |

**Exceptions**

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

#### OpcDataVariableNode(OpcNodeModel, OpcName)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified.

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

```csharp
protected OpcDataVariableNode(OpcNodeModel model, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |

#### OpcDataVariableNode(OpcNodeModel, OpcName, T)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value given by `value`.

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

```csharp
protected OpcDataVariableNode(OpcNodeModel model, OpcName name, T value)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName, value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(OpcNodeModel, OpcName, OpcNodeId)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified.

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

```csharp
protected OpcDataVariableNode(OpcNodeModel model, OpcName name, OpcNodeId id)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, name As OpcName, id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |

#### OpcDataVariableNode(OpcNodeModel, OpcName, OpcNodeId, T)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value given by `value`.

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

```csharp
protected OpcDataVariableNode(
    OpcNodeModel model,
    OpcName name,
    OpcNodeId id,
    T value)
```

</div>

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

```vbnet
Protected Sub New(
    model As OpcNodeModel,
    name As OpcName,
    id As OpcNodeId,
    value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified as a child node of the `parent` node given.

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

```csharp
protected OpcDataVariableNode(OpcNodeModel model, IOpcNode parent, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(model As OpcNodeModel, parent As IOpcNode, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |

#### OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, T)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` specified with the initial value defined by `value` as a child node of the `parent` node given.

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

```csharp
protected OpcDataVariableNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name,
    T value)
```

</div>

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

```vbnet
Protected Sub New(
    model As OpcNodeModel,
    parent As IOpcNode,
    name As OpcName,
    value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `value` | T | The initial value of the new data variable node. |

#### OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified as a child node of the `parent` node given.

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

```csharp
protected OpcDataVariableNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name,
    OpcNodeId id)
```

</div>

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

```vbnet
Protected Sub New(
    model As OpcNodeModel,
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |

#### OpcDataVariableNode(OpcNodeModel, IOpcNode, OpcName, OpcNodeId, T)

<span class="api-meta">protected · since v2.50</span>

Initializes a new instance of the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/) class accessible by the `name` and `id` specified with the initial value defined by `value` as a child node of the `parent` node given.

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

```csharp
protected OpcDataVariableNode(
    OpcNodeModel model,
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    T value)
```

</div>

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

```vbnet
Protected Sub New(
    model As OpcNodeModel,
    parent As IOpcNode,
    name As OpcName,
    id As OpcNodeId,
    value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `model` | [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) | The [OpcNodeModel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodemodel/) which defines the modelling directives for the new node or a null reference (Nothing in Visual Basic) if there are no directives are to be applied to the node. |
| `parent` | [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) | The [IOpcNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcnode/) used as the parent node or a null reference (Nothing in Visual Basic) in the case there is no parent node available. |
| `name` | [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) | The [OpcName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/) through that the new data variable node can be accessed. |
| `id` | [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) | The [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) through that the new data variable node can be identified and accessed. |
| `value` | T | The initial value of the new data variable node. |

## Properties

### DataType

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

Gets or sets a value which defines a pre-defined used [DataTypeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#datatypeid) as one of the members defined by the [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/) enumeration to simplify querying standard data types.

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

```csharp
public override OpcDataType DataType { get; set; }
```

</div>

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

```vbnet
Public Overrides Property DataType As OpcDataType
```

</div>

**Property value**

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

One of the members defined by the [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/) enumeration.

**Overrides**

[DataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#datatype)

### Value

Gets or sets the value of the data variable node.

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

```csharp
public T Value { get; set; }
```

</div>

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

```vbnet
Public Property Value As T
```

</div>

**Property value**

T

A `T` representing the value of the data variable node. This can be also a null reference (Nothing in Visual Basic).

## Methods

### InitializeDefaults

<span class="api-meta">protected · override</span>

Initializes the default values used by the [OpcDataVariableNode&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatavariablenode-1/).

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

```csharp
protected override void InitializeDefaults()
```

</div>

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

```vbnet
Protected Overrides Sub InitializeDefaults()
```

</div>

**Overrides**

[InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablenode/members#initializedefaults)

**Remarks**

This method is used to ensure the availability of appropriate node specific default values. For more information like when this method is to be overwritten see [InitializeDefaults](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnode/members#initializedefaults).

### ReadGenericValue

Reads the data variable node value using the `context` specified.

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

```csharp
public T ReadGenericValue(OpcReadVariableValueContext context)
```

</div>

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

```vbnet
Public Function ReadGenericValue(context As OpcReadVariableValueContext) As T
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcReadVariableValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadvariablevaluecontext/) | The [OpcReadVariableValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreadvariablevaluecontext/) to use to read the data variable node value. |

**Returns**

T

The `T` data variable node value associated with this node and read using the `context` specified. This can also be a null reference (Nothing in Visual Basic).

**Exceptions**

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

### WriteGenericValue

Writes the `value` to the data variable node value using the `context` specified.

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

```csharp
public void WriteGenericValue(OpcWriteVariableValueContext context, T value)
```

</div>

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

```vbnet
Public Sub WriteGenericValue(
    context As OpcWriteVariableValueContext,
    value As T)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcWriteVariableValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritevariablevaluecontext/) | The [OpcWriteVariableValueContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcwritevariablevaluecontext/) to use to write the data variable node `value` specified. |
| `value` | T | The `T` to write to the data variable node value. |

**Exceptions**

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