# OpcValue Members

> Reference: Stores a value optionally associated with status and timestamp information.

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

## Constructors

### OpcValue

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

| Overload | Description |
|---|---|
| [OpcValue(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`. |
| [OpcValue(object, DateTime)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value` and the `sourceTimestamp` of the `value`. |
| [OpcValue(object, DateTime, OpcStatus)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime-opc-uafx-opcstatus) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `status` of the `value`. |
| [OpcValue(object, DateTime, OpcStatusCode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime-opc-uafx-opcstatuscode) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `statusCode` of the `value`. |
| [OpcValue(object, DateTime, DateTime)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime-system-datetime) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `serverTimestamp` of the `value`. |
| [OpcValue(object, DateTime, DateTime, OpcStatus)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime-system-datetime-opc-uafx-opcstatus) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp`, `serverTimestamp` and `status` of the `value`. |
| [OpcValue(object, DateTime, DateTime, OpcStatusCode)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#opcvalue-system-object-system-datetime-system-datetime-opc-uafx-opcstatuscode) | Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp`, `serverTimestamp` and `statusCode` of the `value`. |

#### OpcValue(object)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`.

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

```csharp
public OpcValue(object value)
```

</div>

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

```vbnet
Public Sub New(value As Object)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |

#### OpcValue(object, DateTime)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value` and the `sourceTimestamp` of the `value`.

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

```csharp
public OpcValue(object value, DateTime sourceTimestamp)
```

</div>

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

```vbnet
Public Sub New(value As Object, sourceTimestamp As Date)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the `value`. |

#### OpcValue(object, DateTime, OpcStatus)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `status` of the `value`.

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

```csharp
public OpcValue(object value, DateTime sourceTimestamp, OpcStatus status)
```

</div>

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

```vbnet
Public Sub New(value As Object, sourceTimestamp As Date, status As OpcStatus)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the value. |
| `status` | [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) | The status information associated with the `value`. |

#### OpcValue(object, DateTime, OpcStatusCode)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `statusCode` of the `value`.

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

```csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    OpcStatusCode statusCode)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    statusCode As OpcStatusCode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the value. |
| `statusCode` | [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) | One of the [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) members which defines the status information associated with the `value`. |

#### OpcValue(object, DateTime, DateTime)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp` and `serverTimestamp` of the `value`.

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

```csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp)
```

</div>

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

```vbnet
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the `value`. |
| `serverTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the server recorded the `value`. |

#### OpcValue(object, DateTime, DateTime, OpcStatus)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp`, `serverTimestamp` and `status` of the `value`.

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

```csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatus status)
```

</div>

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

```vbnet
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    status As OpcStatus)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the `value`. |
| `serverTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the server recorded the `value`. |
| `status` | [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) | The status information associated with the `value`. |

#### OpcValue(object, DateTime, DateTime, OpcStatusCode)

Initializes a new instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class using the `value`, `sourceTimestamp`, `serverTimestamp` and `statusCode` of the `value`.

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

```csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatusCode statusCode)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    statusCode As OpcStatusCode)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value to represent. |
| `sourceTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the source produced the `value`. |
| `serverTimestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The timestamp at which the server recorded the `value`. |
| `statusCode` | [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) | One of the [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) members which defines the status information associated with the `value`. |

## Properties

### DataType

Gets the type of value represented.

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

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

</div>

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

```vbnet
Public ReadOnly Property DataType As OpcDataType
```

</div>

**Property value**

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

One of the members defined by the [OpcDataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/). In case there [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) is a null reference (Nothing in Visual Basic) [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcdatatype/#null).

### DataTypeId

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

Gets the node identifier of the [DataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#datatype) of the value represented.

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

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

</div>

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

```vbnet
Public Overridable ReadOnly Property DataTypeId As OpcNodeId
```

</div>

**Property value**

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

An instance of the [OpcNodeId](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcnodeid/) representing the node identifier of the [DataType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#datatype).

### Rank

Gets the rank of the value represented.

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

```csharp
public int Rank { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Rank As Integer
```

</div>

**Property value**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

The rank of the value or -2 in case there is no type information available for the value represented.

### ServerPicoseconds

Gets or sets the difference between a high resolution timestamp with a resolution of 10 picoseconds and the [ServerTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#servertimestamp) which only has a 100 ns resolution.

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

```csharp
public ushort ServerPicoseconds { get; set; }
```

</div>

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

```vbnet
Public Property ServerPicoseconds As UShort
```

</div>

**Property value**

[UInt16](https://learn.microsoft.com/dotnet/api/system.uint16)

The number of 10 picosecond intervals for the [ServerTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#servertimestamp).

**Remarks**

The value should be less than 10 000.

### ServerTimestamp

Gets or sets the timestamp at which the server recorded the value.

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

```csharp
public DateTime? ServerTimestamp { get; set; }
```

</div>

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

```vbnet
Public Property ServerTimestamp As Date?
```

</div>

**Property value**

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

The timestamp of the server for the value or a null reference (Nothing in Visual Basic) in case there is no timestamp provided by the server.

### SourcePicoseconds

Gets or sets the difference between a high resolution timestamp with a resolution of 10 picoseconds and the [SourceTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#sourcetimestamp) which only has a 100 ns resolution.

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

```csharp
public ushort SourcePicoseconds { get; set; }
```

</div>

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

```vbnet
Public Property SourcePicoseconds As UShort
```

</div>

**Property value**

[UInt16](https://learn.microsoft.com/dotnet/api/system.uint16)

The number of 10 picosecond intervals for the [SourceTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#sourcetimestamp).

**Remarks**

The value should be less than 10 000.

### SourceTimestamp

Gets or sets the timestamp of the source from that the value originates.

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

```csharp
public DateTime? SourceTimestamp { get; set; }
```

</div>

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

```vbnet
Public Property SourceTimestamp As Date?
```

</div>

**Property value**

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

The timestamp of the source for the value or a null reference (Nothing in Visual Basic) in case there is no timestamp provided by the source of the value.

### Status

Gets the status information which defines the servers ability to access/provide the value.

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

```csharp
public OpcStatus Status { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Status As OpcStatus
```

</div>

**Property value**

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

The status information associated with the value.

**Remarks**

If the status information indicates an error then the value is to be ignored and the server shall set it to a null reference (Nothing in Visual Basic).

### Value

Gets or sets the value represented.

<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)

The value associated with the metadata represented.

## Methods

### As

Retrieves the underlying [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) as the type specified by `T`.

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

```csharp
public T As<T>(T defaultValue = default)
```

</div>

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

```vbnet
Public Function [As](Of T)(defaultValue As T = Nothing) As T
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type to use to retrieve the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value). |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `defaultValue` | T | The value to provide in the case there the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) is a null reference (Nothing in Visual Basic). Optional, default `default`. |

**Returns**

T

The [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) typed as `T` or `defaultValue` in case there [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) is a null reference (Nothing in Visual Basic) or could not converted to the `T` specified.

### AsValue

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

Retrieves a new [OpcValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/) instance its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/members#value) is of the type specified by `T`.

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

```csharp
public OpcValue<T> AsValue<T>()
```

</div>

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

```vbnet
Public Function AsValue(Of T)() As OpcValue(Of T)
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type to use to retrieve a new [OpcValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/) instance. |

**Returns**

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

A new instance of the [OpcValue&lt;T&gt;](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/) class its [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue-1/members#value) is typed as `T` and its further value information has been adopted from this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) or a null reference (Nothing in Visual Basic) if the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#value) could not converted to the `T` specified.

### CompareTo

<span class="api-meta">virtual · 2 overloads</span>

| Overload | Description |
|---|---|
| [CompareTo(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#compareto-system-object)<span class="api-meta">virtual</span> | Compares the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) with the `other`. |
| [CompareTo(OpcValue)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#compareto-opc-uafx-opcvalue)<span class="api-meta">virtual</span> | Compares the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) with another [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

#### CompareTo(object)

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

Compares the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) with the `other`.

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

```csharp
public virtual int CompareTo(object other)
```

</div>

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

```vbnet
Public Overridable Function CompareTo(other As Object) As Integer
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare with this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

A 32-bit signed integer that indicates the relative order of the objects being compared ([CompareTo(object)](https://learn.microsoft.com/dotnet/api/system.icomparable.compareto)).

**Implements**

[CompareTo(object)](https://learn.microsoft.com/dotnet/api/system.icomparable.compareto)

#### CompareTo(OpcValue)

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

Compares the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) with another [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/).

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

```csharp
public virtual int CompareTo(OpcValue other)
```

</div>

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

```vbnet
Public Overridable Function CompareTo(other As OpcValue) As Integer
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare with this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

A 32-bit signed integer that indicates the relative order of the objects being compared ([CompareTo(T)](https://learn.microsoft.com/dotnet/api/system.icomparable-1.compareto)).

**Implements**

[CompareTo(OpcValue)](https://learn.microsoft.com/dotnet/api/system.icomparable-1.compareto)

### Equals

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

| Overload | Description |
|---|---|
| [Equals(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#equals-system-object)<span class="api-meta">override</span> | Determines whether the specified `other` is equal to this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |
| [Equals(OpcValue)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#equals-opc-uafx-opcvalue)<span class="api-meta">virtual</span> | Determines whether the specified `other` is equal to this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

#### Equals(object)

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

Determines whether the specified `other` is equal to this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/).

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

```csharp
public override bool Equals(object other)
```

</div>

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

```vbnet
Public Overrides Function Equals(other As Object) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare to the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) is equal to the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/); otherwise the value false.

**Overrides**

[Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals%28system-object%29)

#### Equals(OpcValue)

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

Determines whether the specified `other` is equal to this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/).

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

```csharp
public virtual bool Equals(OpcValue other)
```

</div>

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

```vbnet
Public Overridable Function Equals(other As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `other` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare to the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/). |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if the specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) is equal to the current [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/); otherwise the value false.

**Implements**

[Equals(OpcValue)](https://learn.microsoft.com/dotnet/api/system.iequatable-1.equals)

### GetHashCode

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

Retrieves a hash code for this [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/).

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

```csharp
public override int GetHashCode()
```

</div>

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

```vbnet
Public Overrides Function GetHashCode() As Integer
```

</div>

**Returns**

[Int32](https://learn.microsoft.com/dotnet/api/system.int32)

An [int](https://learn.microsoft.com/dotnet/api/system.int32) that contains the hash code for the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/).

**Overrides**

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

### ToString

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

| Overload | Description |
|---|---|
| [ToString()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#tostring-noparams)<span class="api-meta">override</span> | Converts the value of this instance to its equivalent string representation. |
| [ToString(string, IFormatProvider)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#tostring-system-string-system-iformatprovider)<span class="api-meta">virtual</span> | Converts the value of this instance to its equivalent string representation using the specified format and culture-specific format information. |

#### ToString()

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

Converts the value of this instance to its equivalent string representation.

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

```csharp
public override string ToString()
```

</div>

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

```vbnet
Public Overrides Function ToString() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The string representation of the value of this instance.

**Overrides**

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

#### ToString(string, IFormatProvider)

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

Converts the value of this instance to its equivalent string representation using the specified format and culture-specific format information.

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

```csharp
public virtual string ToString(string format, IFormatProvider formatProvider)
```

</div>

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

```vbnet
Public Overridable Function ToString(
    format As String,
    formatProvider As IFormatProvider) As String
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `format` | [String](https://learn.microsoft.com/dotnet/api/system.string) | A standard or custom format string. |
| `formatProvider` | [IFormatProvider](https://learn.microsoft.com/dotnet/api/system.iformatprovider) | An object that supplies culture-specific formatting information. |

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The string representation of the value of this instance as specified by format and provider.

**Exceptions**

| Exception | Condition |
|---|---|
| [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception) | The `format` is invalid or not supported. |

**Implements**

[ToString(string, IFormatProvider)](https://learn.microsoft.com/dotnet/api/system.iformattable.tostring)

## Operators

### Equality

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

Returns a value indicating whether two instance of [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) are equal.

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

```csharp
public static bool operator ==(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator =(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if left and right are equal; otherwise the value false.

### Explicit

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

Converts a [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to an <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> object.

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

```csharp
public static explicit operator DataValue(OpcValue value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcValue) As DataValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | A [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) that represents the value. |

**Returns**

<abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr>

An instance of the <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> class initialized from the `value`.

### GreaterThan

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

Determines whether the first specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object is greater than the second specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static bool operator >(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator >(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is greater than `right`; otherwise, false.

### GreaterThanOrEqual

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

Determines whether the first specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object is greater than or equal to the second specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static bool operator >=(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator >=(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is greater than or equal to `right`; otherwise, false.

### Implicit

<span class="api-meta">static · 29 overloads</span>

| Overload | Description |
|---|---|
| [implicit operator OpcValue(bool)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-boolean-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [bool](https://learn.microsoft.com/dotnet/api/system.boolean) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(bool?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-boolean-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [bool](https://learn.microsoft.com/dotnet/api/system.boolean) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(byte)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-byte-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [byte](https://learn.microsoft.com/dotnet/api/system.byte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(byte?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-byte-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [byte](https://learn.microsoft.com/dotnet/api/system.byte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(sbyte)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-sbyte-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(sbyte?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-sbyte-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(char)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-char-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [char](https://learn.microsoft.com/dotnet/api/system.char) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(char?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-char-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [char](https://learn.microsoft.com/dotnet/api/system.char) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(decimal)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-decimal-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(decimal?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-decimal-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(double)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-double-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [double](https://learn.microsoft.com/dotnet/api/system.double) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(double?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-double-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [double](https://learn.microsoft.com/dotnet/api/system.double) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(float)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-single-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [float](https://learn.microsoft.com/dotnet/api/system.single) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(float?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-single-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [float](https://learn.microsoft.com/dotnet/api/system.single) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(int)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-int32-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [int](https://learn.microsoft.com/dotnet/api/system.int32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(int?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-int32-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [int](https://learn.microsoft.com/dotnet/api/system.int32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(uint)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-uint32-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [uint](https://learn.microsoft.com/dotnet/api/system.uint32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(uint?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-uint32-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [uint](https://learn.microsoft.com/dotnet/api/system.uint32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(long)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-int64-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(long?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-int64-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(ulong)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-uint64-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(ulong?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-uint64-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(short)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-int16-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(short?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-int16-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(ushort)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-uint16-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(ushort?)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-nullable-of-system-uint16-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-system-string-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(DataValue)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-opc-ua-datavalue-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| [implicit operator OpcValue(Variant)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#op-implicit-opc-ua-variant-opc-uafx-opcvalue)<span class="api-meta">static</span> | Converts a <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.Variant">Variant</abbr> to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |

#### implicit operator OpcValue(bool)

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

Converts a [bool](https://learn.microsoft.com/dotnet/api/system.boolean) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(bool value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Boolean) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Boolean](https://learn.microsoft.com/dotnet/api/system.boolean) | A [bool](https://learn.microsoft.com/dotnet/api/system.boolean) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(bool?)

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

Converts a null-able [bool](https://learn.microsoft.com/dotnet/api/system.boolean) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(bool? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Boolean?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)&gt; | A null-able [bool](https://learn.microsoft.com/dotnet/api/system.boolean) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(byte)

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

Converts a [byte](https://learn.microsoft.com/dotnet/api/system.byte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(byte value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Byte) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte) | A [byte](https://learn.microsoft.com/dotnet/api/system.byte) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(byte?)

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

Converts a null-able [byte](https://learn.microsoft.com/dotnet/api/system.byte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(byte? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Byte?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Byte](https://learn.microsoft.com/dotnet/api/system.byte)&gt; | A null-able [byte](https://learn.microsoft.com/dotnet/api/system.byte) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(sbyte)

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

Converts a [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(sbyte value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [SByte](https://learn.microsoft.com/dotnet/api/system.sbyte) | A [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(sbyte?)

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

Converts a null-able [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(sbyte? value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[SByte](https://learn.microsoft.com/dotnet/api/system.sbyte)&gt; | A null-able [sbyte](https://learn.microsoft.com/dotnet/api/system.sbyte) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(char)

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

Converts a [char](https://learn.microsoft.com/dotnet/api/system.char) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(char value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Char) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Char](https://learn.microsoft.com/dotnet/api/system.char) | A [char](https://learn.microsoft.com/dotnet/api/system.char) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(char?)

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

Converts a null-able [char](https://learn.microsoft.com/dotnet/api/system.char) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(char? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Char?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Char](https://learn.microsoft.com/dotnet/api/system.char)&gt; | A null-able [char](https://learn.microsoft.com/dotnet/api/system.char) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(decimal)

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

Converts a [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(decimal value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Decimal) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Decimal](https://learn.microsoft.com/dotnet/api/system.decimal) | A [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(decimal?)

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

Converts a null-able [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(decimal? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Decimal?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Decimal](https://learn.microsoft.com/dotnet/api/system.decimal)&gt; | A null-able [decimal](https://learn.microsoft.com/dotnet/api/system.decimal) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(double)

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

Converts a [double](https://learn.microsoft.com/dotnet/api/system.double) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(double value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Double) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Double](https://learn.microsoft.com/dotnet/api/system.double) | A [double](https://learn.microsoft.com/dotnet/api/system.double) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(double?)

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

Converts a null-able [double](https://learn.microsoft.com/dotnet/api/system.double) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(double? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Double?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Double](https://learn.microsoft.com/dotnet/api/system.double)&gt; | A null-able [double](https://learn.microsoft.com/dotnet/api/system.double) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(float)

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

Converts a [float](https://learn.microsoft.com/dotnet/api/system.single) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(float value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Single) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Single](https://learn.microsoft.com/dotnet/api/system.single) | A [float](https://learn.microsoft.com/dotnet/api/system.single) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(float?)

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

Converts a null-able [float](https://learn.microsoft.com/dotnet/api/system.single) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(float? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Single?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Single](https://learn.microsoft.com/dotnet/api/system.single)&gt; | A null-able [float](https://learn.microsoft.com/dotnet/api/system.single) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(int)

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

Converts a [int](https://learn.microsoft.com/dotnet/api/system.int32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(int value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Integer) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | A [int](https://learn.microsoft.com/dotnet/api/system.int32) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(int?)

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

Converts a null-able [int](https://learn.microsoft.com/dotnet/api/system.int32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(int? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Integer?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int32](https://learn.microsoft.com/dotnet/api/system.int32)&gt; | A null-able [int](https://learn.microsoft.com/dotnet/api/system.int32) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(uint)

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

Converts a [uint](https://learn.microsoft.com/dotnet/api/system.uint32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(uint value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [UInt32](https://learn.microsoft.com/dotnet/api/system.uint32) | A [uint](https://learn.microsoft.com/dotnet/api/system.uint32) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(uint?)

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

Converts a null-able [uint](https://learn.microsoft.com/dotnet/api/system.uint32) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(uint? value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt32](https://learn.microsoft.com/dotnet/api/system.uint32)&gt; | A null-able [uint](https://learn.microsoft.com/dotnet/api/system.uint32) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(long)

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

Converts a [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(long value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Long) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Int64](https://learn.microsoft.com/dotnet/api/system.int64) | A [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(long?)

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

Converts a null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(long? value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As Long?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int64](https://learn.microsoft.com/dotnet/api/system.int64)&gt; | A null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(ulong)

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

Converts a [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(ulong value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [UInt64](https://learn.microsoft.com/dotnet/api/system.uint64) | A [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(ulong?)

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

Converts a null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(ulong? value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt64](https://learn.microsoft.com/dotnet/api/system.uint64)&gt; | A null-able [ulong](https://learn.microsoft.com/dotnet/api/system.uint64) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(short)

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

Converts a [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(short value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Short) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Int16](https://learn.microsoft.com/dotnet/api/system.int16) | A [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(short?)

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

Converts a null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(short? value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As Short?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[Int16](https://learn.microsoft.com/dotnet/api/system.int16)&gt; | A null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(ushort)

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

Converts a [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(ushort value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [UInt16](https://learn.microsoft.com/dotnet/api/system.uint16) | A [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(ushort?)

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

Converts a null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(ushort? value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort?) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Nullable](https://learn.microsoft.com/dotnet/api/system.nullable-1)&lt;[UInt16](https://learn.microsoft.com/dotnet/api/system.uint16)&gt; | A null-able [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(string)

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

Converts a [string](https://learn.microsoft.com/dotnet/api/system.string) to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(string value)
```

</div>

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

```vbnet
Public Shared Widening Operator CType(value As String) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | A [string](https://learn.microsoft.com/dotnet/api/system.string) that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(DataValue)

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

Converts a <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(DataValue value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As DataValue) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> | A <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.DataValue">DataValue</abbr> that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

#### implicit operator OpcValue(Variant)

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

Converts a <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.Variant">Variant</abbr> to an [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static implicit operator OpcValue(Variant value)
```

</div>

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

```vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As [Variant]) As OpcValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.Variant">Variant</abbr> | A <abbr title="OPC Foundation stack type, not documented here: Opc.Ua.Variant">Variant</abbr> that represents the value. |

**Returns**

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

An instance of the [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) class initialized from the `value`.

### Inequality

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

Returns a value indicating whether two instances of [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) are not equal.

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

```csharp
public static bool operator !=(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator <>(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) to compare. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if left and right are not equal; otherwise the value false.

### LessThan

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

Determines whether the first specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object is less than the second specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static bool operator <(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator <(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is less than `right`; otherwise the value false.

**Exceptions**

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

### LessThanOrEqual

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

Determines whether the first specified [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object is less than or equal to the second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object.

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

```csharp
public static bool operator <=(OpcValue left, OpcValue right)
```

</div>

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

```vbnet
Public Shared Operator <=(left As OpcValue, right As OpcValue) As Boolean
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The first [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |
| `right` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The second [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) object. |

**Returns**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if `left` is less than or equal to `right`; otherwise the value false.

**Exceptions**

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