# OpcTextVariableNode Members

> Reference: Defines a variable node for texts.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcTextVariableNode</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

### OpcTextVariableNode

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

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

#### OpcTextVariableNode(OpcName)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class accessible by the `name` specified.

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

```csharp
public OpcTextVariableNode(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 text variable node can be accessed. |

#### OpcTextVariableNode(OpcName, OpcText)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class accessible by the `name` specified with the initial value given by `value`.

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

```csharp
public OpcTextVariableNode(OpcName name, OpcText value)
```

</div>

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

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

</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 text variable node can be accessed. |
| `value` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The initial value of the new text variable node. |

#### OpcTextVariableNode(OpcName, OpcNodeId)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class accessible by the `name` and `id` specified.

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

```csharp
public OpcTextVariableNode(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 text 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 text variable node can be identified and accessed. |

#### OpcTextVariableNode(OpcName, OpcNodeId, OpcText)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class accessible by the `name` and `id` specified with the initial value given by `value`.

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

```csharp
public OpcTextVariableNode(OpcName name, OpcNodeId id, OpcText value)
```

</div>

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

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

</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 text 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 text variable node can be identified and accessed. |
| `value` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The initial value of the new text variable node. |

#### OpcTextVariableNode(IOpcNode, OpcName)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class accessible by the `name` specified as a child node of the `parent` node given.

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

```csharp
public OpcTextVariableNode(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 text variable node can be accessed. |

#### OpcTextVariableNode(IOpcNode, OpcName, OpcText)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) 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 OpcTextVariableNode(IOpcNode parent, OpcName name, OpcText value)
```

</div>

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

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

</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 text variable node can be accessed. |
| `value` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The initial value of the new text variable node. |

#### OpcTextVariableNode(IOpcNode, OpcName, OpcNodeId)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) 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 OpcTextVariableNode(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 text 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 text variable node can be identified and accessed. |

#### OpcTextVariableNode(IOpcNode, OpcName, OpcNodeId, OpcText)

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) 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 OpcTextVariableNode(
    IOpcNode parent,
    OpcName name,
    OpcNodeId id,
    OpcText value)
```

</div>

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

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

</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 text 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 text variable node can be identified and accessed. |
| `value` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The initial value of the new text variable node. |

#### OpcTextVariableNode(BaseDataVariableState&lt;LocalizedText&gt;)

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

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcTextVariableNode(BaseDataVariableState<LocalizedText> content)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState</abbr>&lt;<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.LocalizedText">LocalizedText</abbr>&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). |

#### OpcTextVariableNode(BaseDataVariableState&lt;LocalizedText&gt;, OpcNodeModel)

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

Initializes a new instance of the [OpcTextVariableNode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctextvariablenode/) class using the `content` as the instance to wrap.

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

```csharp
protected OpcTextVariableNode(
    BaseDataVariableState<LocalizedText> content,
    OpcNodeModel model)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `content` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.BaseDataVariableState">BaseDataVariableState</abbr>&lt;<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.LocalizedText">LocalizedText</abbr>&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). |

## Properties

### Value

Gets or sets the value of the text variable node.

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

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

</div>

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

```vbnet
Public Property Value As OpcText
```

</div>

**Property value**

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

A [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) representing the value of the text variable node. This can be also a null reference (Nothing in Visual Basic).

## Methods

### ReadTextValue

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

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

```csharp
public OpcText ReadTextValue(OpcReadVariableValueContext context)
```

</div>

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

```vbnet
Public Function ReadTextValue(context As OpcReadVariableValueContext) As OpcText
```

</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 text variable node value. |

**Returns**

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

The [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) 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). |

### WriteTextValue

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

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

```csharp
public void WriteTextValue(OpcWriteVariableValueContext context, OpcText value)
```

</div>

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

```vbnet
Public Sub WriteTextValue(
    context As OpcWriteVariableValueContext,
    value As OpcText)
```

</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 text variable node `value` specified. |
| `value` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) to write to the text 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). |
