# OpcHistoryValue Members

> Reference: Represents a value of the history of a node.

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

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

## Constructors

### OpcHistoryValue

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

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

#### OpcHistoryValue(object, DateTime)

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

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

```csharp
public OpcHistoryValue(object value, DateTime timestamp)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value. |
| `timestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The time of the value, which is used as the source and the server timestamp. |

#### OpcHistoryValue(object, DateTime, OpcStatus)

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

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

```csharp
public OpcHistoryValue(object value, DateTime timestamp, OpcStatus status)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value. |
| `timestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The time of the value, which is used as the source and the server timestamp. |
| `status` | [OpcStatus](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatus/) | The status of the value. |

#### OpcHistoryValue(object, DateTime, OpcStatusCode)

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

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

```csharp
public OpcHistoryValue(
    object value,
    DateTime timestamp,
    OpcStatusCode statusCode)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value. |
| `timestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The time of the value, which is used as the source timestamp. |
| `statusCode` | [OpcStatusCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcstatuscode/) | The status code of the value. |

**Remarks**

Unlike the other constructors, this constructor sets the source timestamp only; the server timestamp remains unset.

## Properties

### Timestamp

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

Gets the time of the value, by which the history is ordered.

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

```csharp
public virtual DateTime Timestamp { get; }
```

</div>

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

```vbnet
Public Overridable ReadOnly Property Timestamp As Date
```

</div>

**Property value**

[DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

The [ServerTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#servertimestamp) or, if it is not set, the [SourceTimestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#sourcetimestamp); [MinValue](https://learn.microsoft.com/dotnet/api/system.datetime.minvalue) if neither is set.

## Methods

### CompareTo

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

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

```csharp
public int CompareTo(OpcHistoryValue other)
```

</div>

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

```vbnet
Public Function CompareTo(other As OpcHistoryValue) As Integer
```

</div>

**Parameters**

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

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

### Create

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

| Overload | Description |
|---|---|
| [Create(OpcValue)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#create-opc-uafx-opcvalue)<span class="api-meta">static</span> | Creates an [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) from the `value` specified. |
| [Create&lt;T&gt;(OpcVariableValue&lt;T&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#create-t1-opc-uafx-opcvariablevalue-of-t0)<span class="api-meta">static</span> | Creates an [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) from the `value` of a variable node. |

**Exceptions (all overloads)**

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

#### Create(OpcValue)

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

Creates an [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) from the `value` specified.

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

```csharp
public static OpcHistoryValue Create(OpcValue value)
```

</div>

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

```vbnet
Public Shared Function Create(value As OpcValue) As OpcHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [OpcValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/) | The value providing the data of the history value. |

**Returns**

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

An [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) holding the data of the `value`.

**Remarks**

The history value uses a copy of the data of the `value`, so that a change of one value does not change the other.

#### Create&lt;T&gt;(OpcVariableValue&lt;T&gt;)

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

Creates an [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) from the `value` of a variable node.

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

```csharp
public static OpcHistoryValue Create<T>(OpcVariableValue<T> value)
```

</div>

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

```vbnet
Public Shared Function Create(Of T)(
    value As OpcVariableValue(Of T)) As OpcHistoryValue
```

</div>

**Type parameters**

| Name | Description |
|---|---|
| `T` | The type of the value. |

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [OpcVariableValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvariablevalue-1/)&lt;T&gt; | The value of the variable node. |

**Returns**

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

An [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) using the value, the status and the timestamp of the `value`, or the current time (UTC) if it has no timestamp.

### CreateModified

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

| Overload | Description |
|---|---|
| [CreateModified(OpcHistoryModificationType)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationtype) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` specified at the current time (UTC). |
| [CreateModified(OpcHistoryModificationType, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationtype-system-string) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` by the `userName` specified at the current time (UTC). |
| [CreateModified(OpcHistoryModificationType, string, DateTime)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationtype-system-string-system-datetime) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` by the `userName` at the `timestamp` specified. |
| [CreateModified(OpcHistoryModificationType, string, DateTime, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationtype-system-string-system-datetime-system-object) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `value` and a modification of the `modificationType` by the `userName` at the `timestamp` specified. |
| [CreateModified(OpcHistoryModificationInfo)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationinfo) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `modificationInfo` specified. |
| [CreateModified(OpcHistoryModificationInfo, object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#createmodified-opc-uafx-opchistorymodificationinfo-system-object) | Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `modificationInfo` and the `value` specified. |

#### CreateModified(OpcHistoryModificationType)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` specified at the current time (UTC).

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationType modificationType)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationType As OpcHistoryModificationType) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationType` | [OpcHistoryModificationType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationtype/) | The kind of the modification. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding the data of this value.

**Remarks**

The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.

#### CreateModified(OpcHistoryModificationType, string)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` by the `userName` specified at the current time (UTC).

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationType modificationType,
    string userName)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationType As OpcHistoryModificationType,
    userName As String) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationType` | [OpcHistoryModificationType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationtype/) | The kind of the modification. |
| `userName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the user who made the modification. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding the data of this value.

**Remarks**

The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.

#### CreateModified(OpcHistoryModificationType, string, DateTime)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using a modification of the `modificationType` by the `userName` at the `timestamp` specified.

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationType modificationType,
    string userName,
    DateTime timestamp)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationType As OpcHistoryModificationType,
    userName As String,
    timestamp As Date) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationType` | [OpcHistoryModificationType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationtype/) | The kind of the modification. |
| `userName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the user who made the modification. |
| `timestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The time of the modification. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding the data of this value.

**Remarks**

The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.

#### CreateModified(OpcHistoryModificationType, string, DateTime, object)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `value` and a modification of the `modificationType` by the `userName` at the `timestamp` specified.

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationType modificationType,
    string userName,
    DateTime timestamp,
    object value)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationType As OpcHistoryModificationType,
    userName As String,
    timestamp As Date,
    value As Object) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationType` | [OpcHistoryModificationType](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationtype/) | The kind of the modification. |
| `userName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The name of the user who made the modification. |
| `timestamp` | [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) | The time of the modification. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value of the modified value. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding a copy of the data of this value with the `value` specified.

**Remarks**

The status and the timestamps of the modified value are those of this value. This value remains unchanged.

#### CreateModified(OpcHistoryModificationInfo)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `modificationInfo` specified.

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationInfo modificationInfo)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationInfo As OpcHistoryModificationInfo) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) | The information about the modification. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding the data of this value.

**Exceptions**

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

**Remarks**

The modified value shares the data of this value, so that a change of the data of one value also changes the data of the other.

#### CreateModified(OpcHistoryModificationInfo, object)

Creates an [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) from this value using the `modificationInfo` and the `value` specified.

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

```csharp
public OpcModifiedHistoryValue CreateModified(
    OpcHistoryModificationInfo modificationInfo,
    object value)
```

</div>

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

```vbnet
Public Function CreateModified(
    modificationInfo As OpcHistoryModificationInfo,
    value As Object) As OpcModifiedHistoryValue
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `modificationInfo` | [OpcHistoryModificationInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistorymodificationinfo/) | The information about the modification. |
| `value` | [Object](https://learn.microsoft.com/dotnet/api/system.object) | The value of the modified value. |

**Returns**

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

An [OpcModifiedHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcmodifiedhistoryvalue/) holding a copy of the data of this value with the `value` specified.

**Exceptions**

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

**Remarks**

The status and the timestamps of the modified value are those of this value. This value remains unchanged.

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

#### Equals(object)

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

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

<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 [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) to compare to the current [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/). |

**Returns**

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

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

**Overrides**

[Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#equals-system-object)

#### Equals(OpcHistoryValue)

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

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

```csharp
public bool Equals(OpcHistoryValue other)
```

</div>

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

```vbnet
Public Function Equals(other As OpcHistoryValue) As Boolean
```

</div>

**Parameters**

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

**Returns**

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

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

### GetHashCode

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

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

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

**Overrides**

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

### ToString

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

| Overload | Description |
|---|---|
| [ToString()](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#tostring-noparams)<span class="api-meta">override</span> | Returns a string that represents the history value. |
| [ToString(string, IFormatProvider)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#tostring-system-string-system-iformatprovider)<span class="api-meta">override</span> | Returns a string that represents the history value using the `format` and `formatProvider` specified. |

#### ToString()

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

Returns a string that represents the history value.

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

A string containing the [Timestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#timestamp) and the string representation of the value.

**Overrides**

[ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#tostring-noparams)

#### ToString(string, IFormatProvider)

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

Returns a string that represents the history value using the `format` and `formatProvider` specified.

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

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

</div>

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

```vbnet
Public Overrides 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) | The format to use for the value. |
| `formatProvider` | [IFormatProvider](https://learn.microsoft.com/dotnet/api/system.iformatprovider) | The provider to use to format the value. |

**Returns**

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

A string containing the [Timestamp](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/members#timestamp) and the formatted value.

**Overrides**

[ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcvalue/members#tostring-system-string-system-iformatprovider)

## Operators

### Equality

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

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

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) to compare. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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.

### GreaterThan

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

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

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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 [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object is greater than or equal to the second specified [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object.

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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.

### Inequality

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

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

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) to compare. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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 [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object is less than the second specified [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object.

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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 [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object is less than or equal to the second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object.

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The first [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) object. |
| `right` | [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) | The second [OpcHistoryValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opchistoryvalue/) 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). |
