# Bit Struct

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

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

Represents a Bit (high or low) value.

## Syntax

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

```csharp
public struct Bit
```

</div>

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

```vbnet
Public Structure Bit
```

</div>

## Implements

<ul class="api-implements">
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable">IComparable</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.icomparable-1">IComparable</a>&lt;Bit&gt;</li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iconvertible">IConvertible</a></li>
<li><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable</a>&lt;Bit&gt;</li>
</ul>

## Fields

| Name | Description |
|---|---|
| [High](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#high)<span class="api-meta">static</span> | Represents the Bit value high. |
| [HighString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#highstring)<span class="api-meta">static</span> | Represents the Bit value high as a string. |
| [Low](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#low)<span class="api-meta">static</span> | Represents the Bit value low. |
| [LowString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#lowstring)<span class="api-meta">static</span> | Represents the Bit value low as a string. |

## Methods

| Name | Description |
|---|---|
| [CompareTo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#compareto)<span class="api-meta">2 overloads</span> | Compares the current Bit with the `other`. |
| [Equals](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#equals)<span class="api-meta">2 overloads</span> | Determines whether the specified `other` is equal to this Bit. |
| [GetHashCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#gethashcode)<span class="api-meta">override</span> | Retrieves a hash code for this Bit. |
| [GetTypeCode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#gettypecode) | Returns the type code for the Bit value type. |
| [Parse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#parse)<span class="api-meta">static</span> | Converts the specified string representation of a logical value to its Bit equivalent. |
| [ToString](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#tostring)<span class="api-meta">2 overloads</span> | Converts the value of this instance to its equivalent string representation (either "High" or "Low"). |
| [TryParse](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.bit/members#tryparse)<span class="api-meta">static</span> | Tries to convert the specified string representation of a logical value to its Bit equivalent. |

## Operators

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

## Applies to

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