Reference
Bit Members
Represents a Bit (high or low) value.
Reference
Bit Members
- Type
- Bit
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Fields
High
Represents the Bit value high.
public static readonly int HighPublic Shared ReadOnly High As IntegerField value
HighString
Represents the Bit value high as a string.
public static readonly string HighStringPublic Shared ReadOnly HighString As StringField value
Low
Represents the Bit value low.
public static readonly int LowPublic Shared ReadOnly Low As IntegerField value
LowString
Represents the Bit value low as a string.
public static readonly string LowStringPublic Shared ReadOnly LowString As StringField value
Methods
CompareTo
| Overload | Description |
|---|---|
| CompareTo( | Compares the current Bit with the other. |
| CompareTo( | Compares the current Bit with another Bit. |
CompareTo(object)
Compares the current Bit with the other.
public int CompareTo(object other)Public Function CompareTo(other As Object) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Object | The Bit to compare with this Bit. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).
Implements
CompareTo(Bit)
Compares the current Bit with another Bit.
public int CompareTo(Bit other)Public Function CompareTo(other As Bit) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Bit | The Bit to compare with this Bit. |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Implements
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this Bit. |
| Equals( | Determines whether the specified other is equal to this Bit. |
Equals(object)
Determines whether the specified other is equal to this Bit.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The Bit to compare to the current Bit. |
Returns
The value true if the specified Bit is equal to the current Bit; otherwise the value false.
Overrides
Equals(Bit)
Determines whether the specified other is equal to this Bit.
public bool Equals(Bit other)Public Function Equals(other As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Bit | The Bit to compare to the current Bit. |
Returns
The value true if the specified Bit is equal to the current Bit; otherwise the value false.
Implements
GetHashCode
Retrieves a hash code for this Bit.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the Bit.
Overrides
GetTypeCode
Returns the type code for the Bit value type.
public TypeCode GetTypeCode()Public Function GetTypeCode() As TypeCodeReturns
The enumerated constant Boolean.
Implements
Parse
Converts the specified string representation of a logical value to its Bit equivalent.
public static Bit Parse(string value)Public Shared Function Parse(value As String) As BitParameters
| Name | Type | Description |
|---|---|---|
value | String | A string containing the value to convert. |
Returns
The High if value is equivalent to HighString; Low if value is equivalent to LowString.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The value is a null reference ( |
| FormatException | The value is not equivalent to HighString or LowString. |
ToString
| Overload | Description |
|---|---|
| ToString() | Converts the value of this instance to its equivalent string representation ( |
| ToString( | Converts the value of this instance to its equivalent string representation ( |
ToString()
Converts the value of this instance to its equivalent string representation (either "High" or "Low").
public override string ToString()Public Overrides Function ToString() As StringReturns
"High" (the value of the HighString field) if the value of this instance is true, or "Low" (the value of the LowString field) if the value of this instance is false.
Overrides
ToString(IFormatProvider)
Converts the value of this instance to its equivalent string representation (either "High" or "Low").
public string ToString(IFormatProvider provider)Public Function ToString(provider As IFormatProvider) As StringParameters
| Name | Type | Description |
|---|---|---|
provider | IFormatProvider | ( |
Returns
HighString if the value of this instance is true, or LowString if the value of this instance is false.
Implements
TryParse
Tries to convert the specified string representation of a logical value to its Bit equivalent. A return value indicates whether the conversion succeeded or failed.
public static bool TryParse(string value, out Bit result)Public Shared Function TryParse(value As String, result As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
value | String | A string containing the value to convert. |
result | out Bit | When this method returns, if the conversion succeeded, contains High if value is equal to HighString or Low if value is equal to LowString. If the conversion failed, contains false. The conversion fails if value is a null reference ( |
Returns
The value true if value was converted successfully; otherwise the value false.
Operators
Equality
Returns a value indicating whether two values of Bit are equal.
public static bool operator ==(Bit left, Bit right)Public Shared Operator =(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit to compare. |
right | Bit | The second Bit to compare. |
Returns
The value true if left and right are equal; otherwise the value false.
GreaterThan
Determines whether the first specified Bit value is greater than the second specified Bit value.
public static bool operator >(Bit left, Bit right)Public Shared Operator >(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit value. |
right | Bit | The second Bit value. |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified Bit value is greater than or equal to the second specified Bit value.
public static bool operator >=(Bit left, Bit right)Public Shared Operator >=(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit value. |
right | Bit | The second Bit value. |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Implicit
| Overload | Description |
|---|---|
| implicit operator Bit( | Converts a bool to a Bit value. |
| implicit operator Bit( | Converts a byte to a Bit value. |
| implicit operator Bit( | Converts a sbyte to a Bit value. |
| implicit operator Bit( | Converts a short to a Bit value. |
| implicit operator Bit( | Converts a ushort to a Bit value. |
| implicit operator Bit( | Converts a int to a Bit value. |
| implicit operator Bit( | Converts a uint to a Bit value. |
| implicit operator Bit( | Converts a long to a Bit value. |
| implicit operator Bit( | Converts a ulong to a Bit value. |
| implicit operator bool( | Converts a Bit to a bool value. |
| implicit operator int( | Converts a Bit to a int value. |
implicit operator Bit(bool)
Converts a bool to a Bit value.
public static implicit operator Bit(bool value)Public Shared Widening Operator CType(value As Boolean) As BitParameters
| Name | Type | Description |
|---|---|---|
value | Boolean | The bool value. |
Returns
The Bit value from the value.
implicit operator Bit(byte)
Converts a byte to a Bit value.
public static implicit operator Bit(byte value)Public Shared Widening Operator CType(value As Byte) As BitParameters
| Name | Type | Description |
|---|---|---|
value | Byte | The byte value. |
Returns
The Bit value from the value.
implicit operator Bit(sbyte)
Converts a sbyte to a Bit value.
public static implicit operator Bit(sbyte value)Public Shared Widening Operator CType(value As SByte) As BitParameters
| Name | Type | Description |
|---|---|---|
value | SByte | The sbyte value. |
Returns
The Bit value from the value.
implicit operator Bit(short)
Converts a short to a Bit value.
public static implicit operator Bit(short value)Public Shared Widening Operator CType(value As Short) As BitParameters
| Name | Type | Description |
|---|---|---|
value | Int16 | The short value. |
Returns
The Bit value from the value.
implicit operator Bit(ushort)
Converts a ushort to a Bit value.
public static implicit operator Bit(ushort value)Public Shared Widening Operator CType(value As UShort) As BitParameters
| Name | Type | Description |
|---|---|---|
value | UInt16 | The ushort value. |
Returns
The Bit value from the value.
implicit operator Bit(int)
Converts a int to a Bit value.
public static implicit operator Bit(int value)Public Shared Widening Operator CType(value As Integer) As BitParameters
| Name | Type | Description |
|---|---|---|
value | Int32 | The int value. |
Returns
The Bit value from the value.
implicit operator Bit(uint)
Converts a uint to a Bit value.
public static implicit operator Bit(uint value)Public Shared Widening Operator CType(value As UInteger) As BitParameters
| Name | Type | Description |
|---|---|---|
value | UInt32 | The uint value. |
Returns
The Bit value from the value.
implicit operator Bit(long)
Converts a long to a Bit value.
public static implicit operator Bit(long value)Public Shared Widening Operator CType(value As Long) As BitParameters
| Name | Type | Description |
|---|---|---|
value | Int64 | The long value. |
Returns
The Bit value from the value.
implicit operator Bit(ulong)
Converts a ulong to a Bit value.
public static implicit operator Bit(ulong value)Public Shared Widening Operator CType(value As ULong) As BitParameters
| Name | Type | Description |
|---|---|---|
value | UInt64 | The ulong value. |
Returns
The Bit value from the value.
implicit operator bool(Bit)
Converts a Bit to a bool value.
public static implicit operator bool(Bit value)Public Shared Widening Operator CType(value As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
value | Bit | The Bit value. |
Returns
The bool value of the value.
implicit operator int(Bit)
Converts a Bit to a int value.
public static implicit operator int(Bit value)Public Shared Widening Operator CType(value As Bit) As IntegerParameters
| Name | Type | Description |
|---|---|---|
value | Bit | The Bit value. |
Returns
The int value of the value.
Inequality
Returns a value indicating whether two values of Bit are not equal.
public static bool operator !=(Bit left, Bit right)Public Shared Operator <>(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit to compare. |
right | Bit | The second Bit to compare. |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified Bit value is less than the second specified Bit value.
public static bool operator <(Bit left, Bit right)Public Shared Operator <(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit value. |
right | Bit | The second Bit value. |
Returns
The value true if left is less than right; otherwise the value false.
LessThanOrEqual
Determines whether the first specified Bit value is less than or equal to the second Bit value.
public static bool operator <=(Bit left, Bit right)Public Shared Operator <=(left As Bit, right As Bit) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | Bit | The first Bit value. |
right | Bit | The second Bit value. |
Returns
The value true if left is less than or equal to right; otherwise the value false.

