# ByteString Members

> Reference: Defines a sequence of byte values.

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

### ByteString

Initializes a new [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) from the `value` specified.

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

```csharp
public ByteString(params byte[] value)
```

</div>

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

```vbnet
Public Sub New(ParamArray value As Byte())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | params [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The array of [byte](https://learn.microsoft.com/dotnet/api/system.byte) values to represent or a null reference (Nothing in Visual Basic). |

**Remarks**

If `value` is a null reference (Nothing in Visual Basic) an empty array of [byte](https://learn.microsoft.com/dotnet/api/system.byte) values is used.

## Properties

### Length

Gets the total number of elements in all the dimensions of the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/).

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

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

</div>

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

```vbnet
Public ReadOnly Property Length As Integer
```

</div>

**Property value**

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

The total number of elements in all the dimensions of the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/); zero if there are no elements in the array.

## Methods

### CompareTo

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

| Overload | Description |
|---|---|
| [CompareTo(object)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/members#compareto-system-object) | Compares the current [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) with the `other`. |
| [CompareTo(ByteString)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/members#compareto-opc-uafx-bytestring) | Compares the current [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) with another [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/). |

#### CompareTo(object)

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

#### Equals(object)

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

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

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

**Returns**

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

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

**Overrides**

[Equals(object)](https://learn.microsoft.com/dotnet/api/system.valuetype.equals)

#### Equals(ByteString)

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

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

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

</div>

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

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

</div>

**Parameters**

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

**Returns**

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

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

**Implements**

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

### GetHashCode

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

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

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

**Overrides**

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

### Parse

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

Converts the specified hex encoded byte array to its [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) equivalent.

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

```csharp
public static ByteString Parse(string value)
```

</div>

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

```vbnet
Public Shared Function Parse(value As String) As ByteString
```

</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) containing the hex encoded byte array to convert. |

**Returns**

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

A [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) which represents the hex encoded byte array of the `value` specified.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `value` is a null reference (Nothing in Visual Basic). |
| [FormatException](https://learn.microsoft.com/dotnet/api/system.formatexception) | The `value` is not a valid hex encoded byte array. |

### ToArray

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

Copies the [byte](https://learn.microsoft.com/dotnet/api/system.byte) values of the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) to a new array.

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

```csharp
public byte[] ToArray()
```

</div>

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

```vbnet
Public Function ToArray() As Byte()
```

</div>

**Returns**

[Byte](https://learn.microsoft.com/dotnet/api/system.byte)[]

A new array with a copy of the [byte](https://learn.microsoft.com/dotnet/api/system.byte) values of the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/); an empty array if the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) has no value.

### ToString

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

Converts the value of this instance to its equivalent hex encoded 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 hex encoded string representation.

**Overrides**

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

### TryParse

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

Tries to convert the specified hex encoded byte array to its [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) equivalent. A return value indicates whether the conversion succeeded or failed.

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

```csharp
public static bool TryParse(string value, out ByteString result)
```

</div>

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

```vbnet
Public Shared Function TryParse(
    value As String,
    result As ByteString) As Boolean
```

</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) containing the hex encoded byte array to convert. |
| `result` | out [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) | When this method returns, if the conversion succeeded, the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) if `value` is a valid hex encoded byte array. If the conversion failed, contains a default [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/). The conversion fails if `value` is a null reference (Nothing in Visual Basic) or is not a valid hex encoded byte array. |

**Returns**

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

The value true if `value` was converted successfully; otherwise the value false.

## Operators

### Equality

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

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

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

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

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `left` | [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) | The first [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) to compare. |
| `right` | [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) | The second [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) 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 [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) to a [byte](https://learn.microsoft.com/dotnet/api/system.byte) array.

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

```csharp
public static explicit operator byte[](ByteString value)
```

</div>

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

```vbnet
Public Shared Narrowing Operator CType(value As ByteString) As Byte()
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) | The [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value. |

**Returns**

[Byte](https://learn.microsoft.com/dotnet/api/system.byte)[]

The [byte](https://learn.microsoft.com/dotnet/api/system.byte) array of the `value`.

### GreaterThan

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

**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 [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value is greater than or equal to the second specified [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value.

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

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

</div>

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

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

</div>

**Parameters**

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

**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 · 2 overloads</span>

| Overload | Description |
|---|---|
| [implicit operator ByteString(byte)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/members#op-implicit-system-byte-opc-uafx-bytestring)<span class="api-meta">static</span> | Converts a [byte](https://learn.microsoft.com/dotnet/api/system.byte) to a [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value. |
| [implicit operator ByteString(byte\[\])](#op-implicit-system-byte-array-opc-uafx-bytestring)<span class="api-meta">static</span> | Converts a [byte](https://learn.microsoft.com/dotnet/api/system.byte) array to a [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value. |

#### implicit operator ByteString(byte)

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

**Returns**

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

The [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value from the `value`.

#### implicit operator ByteString(byte\[\])

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

Converts a [byte](https://learn.microsoft.com/dotnet/api/system.byte) array to a [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value.

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

```csharp
public static implicit operator ByteString(byte[] value)
```

</div>

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

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

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `value` | [Byte](https://learn.microsoft.com/dotnet/api/system.byte)[] | The [byte](https://learn.microsoft.com/dotnet/api/system.byte) array. |

**Returns**

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

The [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/) value from the `value` or a null reference (Nothing in Visual Basic) if `value` is a null reference (Nothing in Visual Basic).

### Inequality

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

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

</div>

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

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

</div>

**Parameters**

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

**Returns**

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

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

### LessThanOrEqual

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

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

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

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

</div>

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

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

</div>

**Parameters**

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

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

## Indexers

### Item

Gets the [byte](https://learn.microsoft.com/dotnet/api/system.byte) at the specified index.

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

```csharp
public byte this[int index] { get; set; }
```

</div>

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

```vbnet
Public Default Property this[](index As Integer) As Byte
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `index` | [Int32](https://learn.microsoft.com/dotnet/api/system.int32) | The zero-based index of the element to get. |

**Property value**

[Byte](https://learn.microsoft.com/dotnet/api/system.byte)

The [byte](https://learn.microsoft.com/dotnet/api/system.byte) at the specified index.

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception) | The `index` is not valid index in the [ByteString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bytestring/). |
