# OpcEnumValue Members

> Reference: Represent a human-readable representation of an enumeration.

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

## Constructors

### OpcEnumValue

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

| Overload | Description |
|---|---|
| [OpcEnumValue(string, long)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#opcenumvalue-system-string-system-int64) | Initializes a new instance of the [OpcEnumValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/) class using the `name` and `value` provided. |
| [OpcEnumValue(string, long, OpcText)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#opcenumvalue-system-string-system-int64-opc-uafx-opctext) | Initializes a new instance of the [OpcEnumValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/) class using the `name`, `value` and `displayName` provided. |
| [OpcEnumValue(string, long, OpcText, OpcText)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#opcenumvalue-system-string-system-int64-opc-uafx-opctext-opc-uafx-opctext) | Initializes a new instance of the [OpcEnumValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/) class using the `name`, `value`, `displayName` and `description` provided. |

**Exceptions (all overloads)**

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

#### OpcEnumValue(string, long)

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

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

```csharp
public OpcEnumValue(string name, long value)
```

</div>

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

```vbnet
Public Sub New(name As String, value As Long)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The value used for the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#name) and [DisplayName](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#displayname) properties. |
| `value` | [Int64](https://learn.microsoft.com/dotnet/api/system.int64) | The value of the enumeration used for the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#value) property. |

#### OpcEnumValue(string, long, OpcText)

Initializes a new instance of the [OpcEnumValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/) class using the `name`, `value` and `displayName` provided.

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

```csharp
public OpcEnumValue(string name, long value, OpcText displayName)
```

</div>

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

```vbnet
Public Sub New(name As String, value As Long, displayName As OpcText)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The value used for the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#name) property. |
| `value` | [Int64](https://learn.microsoft.com/dotnet/api/system.int64) | The value of the enumeration used for the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#value) property. |
| `displayName` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The human-readable representation of the `value` of the enumeration. |

#### OpcEnumValue(string, long, OpcText, OpcText)

Initializes a new instance of the [OpcEnumValue](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/) class using the `name`, `value`, `displayName` and `description` provided.

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

```csharp
public OpcEnumValue(
    string name,
    long value,
    OpcText displayName,
    OpcText description)
```

</div>

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

```vbnet
Public Sub New(
    name As String,
    value As Long,
    displayName As OpcText,
    description As OpcText)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `name` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The value used for the [Name](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#name) property. |
| `value` | [Int64](https://learn.microsoft.com/dotnet/api/system.int64) | The value of the enumeration used for the [Value](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcenumvalue/members#value) property. |
| `displayName` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The human-readable representation of the `value` of the enumeration. |
| `description` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | A localized description of the enumeration `value`. |

**Remarks**

In case `description` is a null reference (Nothing in Visual Basic), the value of [Null](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/members#null) is used instead.

## Properties

### Description

Gets a localized description of the enumeration value.

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

```csharp
public OpcText Description { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Description As OpcText
```

</div>

**Property value**

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

An instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) class associated with the description.

**Remarks**

This field contains an empty string if no description is available.

### DisplayName

Gets a human-readable representation of the value of the enumeration.

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

```csharp
public OpcText DisplayName { get; }
```

</div>

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

```vbnet
Public ReadOnly Property DisplayName As OpcText
```

</div>

**Property value**

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

An instance of the [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) associated with the human-readable representation.

### Name

Gets an internal name for the value of the enumeration.

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

```csharp
public string Name { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Name As String
```

</div>

**Property value**

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

The [string](https://learn.microsoft.com/dotnet/api/system.string) of the internal name.

### Value

Gets the value representation of an enumeration.

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

```csharp
public long Value { get; }
```

</div>

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

```vbnet
Public ReadOnly Property Value As Long
```

</div>

**Property value**

[Int64](https://learn.microsoft.com/dotnet/api/system.int64)

The [long](https://learn.microsoft.com/dotnet/api/system.int64) value representation.

## Methods

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

#### CompareTo(object)

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

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

**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(OpcEnumValue)

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

#### Equals(object)

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

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

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

**Returns**

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

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

**Overrides**

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

#### Equals(OpcEnumValue)

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

**Returns**

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

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

**Implements**

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

### GetHashCode

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

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

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

**Overrides**

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

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

## Operators

### Equality

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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