# OpcAddVariableNode Members

> Reference: Defines an abstract base class for a single command of the IOpcAddNodesService used to add one variable node (nodes of the category Variable).

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

Inherits members from [OpcAddInstanceNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddinstancenode/members), [OpcAddNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddnode/members), [OpcNodeServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcnodeservicecommand/members), [OpcServiceCommand](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.services.opcservicecommand/members).

## Constructors

### OpcAddVariableNode

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

| Overload | Description |
|---|---|
| [OpcAddVariableNode(OpcVariableType, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcreferencetype)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcreferencetype-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcvariabletype-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcreferencetype)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcreferencetype-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcNodeId)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcnodeid)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |
| [OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#opcaddvariablenode-opc-uafx-opcnodeid-opc-uafx-opcname-opc-uafx-opcnodeid-opc-uafx-opcnodeid-opc-uafx-opcnodeid-system-object)<span class="api-meta">protected</span> | Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. |

#### OpcAddVariableNode(OpcVariableType, OpcName)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` defined. The according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) to identify and access the new node is determined by the service. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(OpcVariableType type, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(type As OpcVariableType, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` defined. The according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) to identify and access the new node is determined by the service. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(OpcVariableType type, OpcName name, object value)
```

</div>

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

```vbnet
Protected Sub New(type As OpcVariableType, name As OpcName, value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId)
```

</div>

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

```vbnet
Protected Sub New(type As OpcVariableType, name As OpcName, nodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` or `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name` or `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the `referenceType` specified as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the reference between the new node and the existing parent node identified by `parentNodeId`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the `referenceType` specified as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the reference between the new node and the existing parent node identified by `parentNodeId`. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using the type of reference identified by `referenceTypeId`. |
| `referenceTypeId` | [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/) which identifies the type of reference to use for the new node and the existing parent node identified by `parentNodeId`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` or `referenceTypeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId`, `parentNodeId` or `referenceTypeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `type` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
protected OpcAddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `type` | [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) | One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration which identifies the predefined underlying type definition the new node will represent an instance of. |
| `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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using the type of reference identified by `referenceTypeId`. |
| `referenceTypeId` | [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/) which identifies the type of reference to use for the new node and the existing parent node identified by `parentNodeId`. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `parentNodeId` or `referenceTypeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `name`, `nodeId`, `parentNodeId` or `referenceTypeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` defined. The according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) to identify and access the new node is determined by the service. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(OpcNodeId typeDefinitionId, OpcName name)
```

</div>

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

```vbnet
Protected Sub New(typeDefinitionId As OpcNodeId, name As OpcName)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId` or `name` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` defined. The according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) to identify and access the new node is determined by the service. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId` or `name` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name` or `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the [ObjectsFolder](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcobjecttypes/members#objectsfolder) node using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name` or `nodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the `referenceType` specified as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the reference between the new node and the existing parent node identified by `parentNodeId`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the `referenceType` specified as the type of reference.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using [HasComponent](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/#hascomponent) as the type of reference. |
| `referenceType` | [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) | One of the members defined by the [OpcReferenceType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcreferencetype/) enumeration to use to setup the reference between the new node and the existing parent node identified by `parentNodeId`. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId` or `parentNodeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcNodeId)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using the type of reference identified by `referenceTypeId`. |
| `referenceTypeId` | [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/) which identifies the type of reference to use for the new node and the existing parent node identified by `parentNodeId`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` or `referenceTypeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId`, `parentNodeId` or `referenceTypeId` is a null reference (Nothing in Visual Basic). |

#### OpcAddVariableNode(OpcNodeId, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object)

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

Initializes a new instance of the [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) class using the specified `typeDefinitionId` of variable node to add, which shall be accessible by the `name` and `nodeId` defined. The new node will be a child of the node identified by `parentNodeId` using the type of reference identified by the `referenceTypeId` specified.

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

```csharp
protected OpcAddVariableNode(
    OpcNodeId typeDefinitionId,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId,
    object value)
```

</div>

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

```vbnet
Protected Sub New(
    typeDefinitionId As OpcNodeId,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId,
    value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) which identifies the type of object to use for the new 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 variable node can be accessed. |
| `nodeId` | [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 node can be identified and accessed. In case there [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) is specified the server will determine the according [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) by its own. |
| `parentNodeId` | [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/) of the parent node to reference using the type of reference identified by `referenceTypeId`. |
| `referenceTypeId` | [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/) which identifies the type of reference to use for the new node and the existing parent node identified by `parentNodeId`. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The initial value of the new variable node. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `parentNodeId` or `referenceTypeId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null) or `name` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcname/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId`, `name`, `nodeId`, `parentNodeId` or `referenceTypeId` is a null reference (Nothing in Visual Basic). |

## Properties

### AccessLevel

Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data.

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

```csharp
public OpcAccessLevel? AccessLevel { get; set; }
```

</div>

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

```vbnet
Public Property AccessLevel As OpcAccessLevel?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/)&gt;

One of the members defined by the [OpcAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/) enumeration if specified; otherwise a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### ArrayDimensions

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

Gets the number/lengths of dimensions for an array [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) with one or more fixed dimensions.

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

```csharp
public OpcArrayDimensions ArrayDimensions { get; set; }
```

</div>

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

```vbnet
Public Property ArrayDimensions As OpcArrayDimensions
```

</div>

**Property value**

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

An instance of the [OpcArrayDimensions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcarraydimensions/) class which offers the number/lengths of dimensions for an array [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value).

**Remarks**

If the [ValueRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#valuerank) does not identify an array of a specific dimension (i.e. [ValueRank](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#valuerank) &lt;= 0) [ArrayDimensions](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#arraydimensions) can be a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### DataType

<span class="api-meta">virtual</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.opcaddvariablenode/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. A null reference (Nothing in Visual Basic) indicates that the attribute is undefined and its default value is used.

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

```csharp
public virtual OpcDataType? DataType { get; set; }
```

</div>

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

```vbnet
Public Overridable Property DataType As OpcDataType?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/)&gt;

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

### DataTypeId

Gets or stets the identifier which identifies the node that defines the type of data represented by the variable node. A null reference (Nothing in Visual Basic) indicates that the attribute is undefined and its default value is used.

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

```csharp
public OpcNodeId DataTypeId { get; set; }
```

</div>

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

```vbnet
Public Property DataTypeId As OpcNodeId
```

</div>

**Property value**

[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/) of the data type node which defines the type of data represented by the variable node. These data type node defines either a simple or a complex type of data accessible by the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) property.

### IsHistorizing

Gets or sets a value indicating whether the server is actively collecting data for the history of the variable.

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

```csharp
public bool? IsHistorizing { get; set; }
```

</div>

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

```vbnet
Public Property IsHistorizing As Boolean?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)&gt;

The value true if the server is actively collecting data; otherwise the value false (the default value) or a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### Type

Gets value indicating the predefined underlying type definition the new node will represent an instance of.

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

```csharp
public OpcVariableType Type { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Type As OpcVariableType
```

</div>

**Property value**

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

One of the members defined by the [OpcVariableType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariabletype/) enumeration or -1 in case of a custom type definition is used (see [TypeDefinitionId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddinstancenode/members#typedefinitionid)).

### UserAccessLevel

Gets or sets a value which indicates in which ways the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/members#value) attribute of the variable node can be accessed (read/write) and if it provides current and/or historic data taking user access rights into account.

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

```csharp
public OpcAccessLevel? UserAccessLevel { get; set; }
```

</div>

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

```vbnet
Public Property UserAccessLevel As OpcAccessLevel?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[OpcAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/)&gt;

One of the members defined by the [OpcAccessLevel](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaccesslevel/) enumeration if specified; otherwise a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

### Value

Gets or sets the value of the variable node which may be simple or complex. A null reference (Nothing in Visual Basic) indicates that the attribute is undefined and its default value is used.

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

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

</div>

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

```vbnet
Public Property Value As Object
```

</div>

**Property value**

[Object](https://learn.microsoft.com/dotnet/api/system.object)

A [object](https://learn.microsoft.com/dotnet/api/system.object) representing the value of the variable node.

### ValueRank

Gets or sets a value which indicates whether the value attribute of the variable is an array and how many dimensions the array has.

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

```csharp
public int? ValueRank { get; set; }
```

</div>

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

```vbnet
Public Property ValueRank As Integer?
```

</div>

**Property value**

[Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt;

One of the values defined by the <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.ValueRanks">ValueRanks</abbr> class or a null reference (Nothing in Visual Basic). In case of a null reference (Nothing in Visual Basic) the server defined default value of the attribute is used.

## Methods

### OfType

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

Retrieves an instance which represents the definition of a variable type that can be used to define [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) command instances using the type of variable node represented by the [OpcAddVariableNode.TypeDefinition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode.typedefinition/) instance provided.

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

```csharp
public static OpcAddVariableNode.TypeDefinition OfType(
    OpcNodeId typeDefinitionId)
```

</div>

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

```vbnet
Public Shared Function OfType(
    typeDefinitionId As OpcNodeId) As OpcAddVariableNode.TypeDefinition
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `typeDefinitionId` | [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/) of the type definition to provide. |

**Returns**

[OpcAddVariableNode.TypeDefinition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode.typedefinition/)

A new instance of the [OpcAddVariableNode.TypeDefinition](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode.typedefinition/) class which can be used to define typed [OpcAddVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcaddvariablenode/) command instances.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `typeDefinitionId` is equals [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/members#null). |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `typeDefinitionId` is a null reference (Nothing in Visual Basic). |
