# OpcText Class

> Reference: Represents a human readable string value optionally associated with a Culture and localization relevant information.

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Members</dt>
<dd><a href="./members">OpcText Members</a></dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Represents a human readable [string](https://learn.microsoft.com/dotnet/api/system.string) value optionally associated with a [Culture](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#culture) and localization relevant information.

## Syntax

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

```csharp
public class OpcText
```

</div>

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

```vbnet
<OpcDataType(21)>
Public Class OpcText
```

</div>

## Inheritance

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

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable">IComparable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iformattable">IFormattable</a></li>
</ul>

## Constructors

| Name | Description |
|---|---|
| [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#opctext)<span class="api-meta">3 overloads</span> | Initializes a new instance of the OpcText class using the `value`. |

## Properties

| Name | Description |
|---|---|
| [Culture](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#culture) | Gets the culture which is used to localize the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#value). |
| [CultureName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#culturename) | Gets the name of the culture used to localize the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#value). |
| [IsNull](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#isnull) | Gets a value indicating whether the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#value) represented is a null reference (Nothing in Visual Basic). |
| [Key](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#key) | Gets the key information associated with the OpcText which can be used to look up alternative localizations of the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#value). |
| [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#null)<span class="api-meta">static</span> | Gets a value used to identify an undefined OpcText. |
| [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#value) | Gets the value represented. |

## Methods

| Name | Description |
|---|---|
| [CompareTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#compareto)<span class="api-meta">2 overloads</span> | Compares the current OpcText with the `other`. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#equals)<span class="api-meta">2 overloads</span> | Determines whether the specified `other` is equal to this OpcText. |
| [Format](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#format) | Replaces the format items in this OpcText with the string representation of a corresponding object in the specified array. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this OpcText. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#tostring)<span class="api-meta">2 overloads</span> | Converts the value of this instance to its equivalent string representation. |

## Operators

| Name | Description |
|---|---|
| [Equality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-equality)<span class="api-meta">static</span> | Returns a value indicating whether two instance of OpcText are equal. |
| [GreaterThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-greaterthan)<span class="api-meta">static</span> | Determines whether the first specified OpcText object is greater than the second specified OpcText object. |
| [GreaterThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-greaterthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcText object is greater than or equal to the second specified OpcText object. |
| [Implicit](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-implicit)<span class="api-meta">static · 4 overloads</span> | Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an OpcText object. |
| [Inequality](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-inequality)<span class="api-meta">static</span> | Returns a value indicating whether two instances of OpcText are not equal. |
| [LessThan](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-lessthan)<span class="api-meta">static</span> | Determines whether the first specified OpcText object is less than the second specified OpcText object. |
| [LessThanOrEqual](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#op-lessthanorequal)<span class="api-meta">static</span> | Determines whether the first specified OpcText object is less than or equal to the second OpcText object. |

## Applies to

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