Skip to content

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 ​

static

Represents the Bit value high.

csharp
public static readonly int High
vbnet
Public Shared ReadOnly High As Integer

Field value

Int32

HighString ​

static

Represents the Bit value high as a string.

csharp
public static readonly string HighString
vbnet
Public Shared ReadOnly HighString As String

Field value

String

Low ​

static

Represents the Bit value low.

csharp
public static readonly int Low
vbnet
Public Shared ReadOnly Low As Integer

Field value

Int32

LowString ​

static

Represents the Bit value low as a string.

csharp
public static readonly string LowString
vbnet
Public Shared ReadOnly LowString As String

Field value

String

Methods ​

CompareTo ​

2 overloads

OverloadDescription
CompareTo(object)Compares the current Bit with the other.
CompareTo(Bit)Compares the current Bit with another Bit.

CompareTo(object) ​

Compares the current Bit with the other.

csharp
public int CompareTo(object other)
vbnet
Public Function CompareTo(other As Object) As Integer

Parameters

NameTypeDescription
otherObjectThe Bit to compare with this Bit.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).

Implements

CompareTo(object)

CompareTo(Bit) ​

Compares the current Bit with another Bit.

csharp
public int CompareTo(Bit other)
vbnet
Public Function CompareTo(other As Bit) As Integer

Parameters

NameTypeDescription
otherBitThe Bit to compare with this Bit.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).

Implements

CompareTo(Bit)

Equals ​

2 overloads

OverloadDescription
Equals(object)overrideDetermines whether the specified other is equal to this Bit.
Equals(Bit)Determines whether the specified other is equal to this Bit.

Equals(object) ​

override

Determines whether the specified other is equal to this Bit.

csharp
public override bool Equals(object other)
vbnet
Public Overrides Function Equals(other As Object) As Boolean

Parameters

NameTypeDescription
otherObjectThe Bit to compare to the current Bit.

Returns

Boolean

The value true if the specified Bit is equal to the current Bit; otherwise the value false.

Overrides

Equals(object)

Equals(Bit) ​

Determines whether the specified other is equal to this Bit.

csharp
public bool Equals(Bit other)
vbnet
Public Function Equals(other As Bit) As Boolean

Parameters

NameTypeDescription
otherBitThe Bit to compare to the current Bit.

Returns

Boolean

The value true if the specified Bit is equal to the current Bit; otherwise the value false.

Implements

Equals(Bit)

GetHashCode ​

override

Retrieves a hash code for this Bit.

csharp
public override int GetHashCode()
vbnet
Public Overrides Function GetHashCode() As Integer

Returns

Int32

An int that contains the hash code for the Bit.

Overrides

GetHashCode()

GetTypeCode ​

Returns the type code for the Bit value type.

csharp
public TypeCode GetTypeCode()
vbnet
Public Function GetTypeCode() As TypeCode

Returns

TypeCode

The enumerated constant Boolean.

Implements

GetTypeCode()

Parse ​

static

Converts the specified string representation of a logical value to its Bit equivalent.

csharp
public static Bit Parse(string value)
vbnet
Public Shared Function Parse(value As String) As Bit

Parameters

NameTypeDescription
valueStringA string containing the value to convert.

Returns

Bit

The High if value is equivalent to HighString; Low if value is equivalent to LowString.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe value is a null reference (Nothing in Visual Basic).
FormatExceptionThe value is not equivalent to HighString or LowString.

ToString ​

2 overloads

OverloadDescription
ToString()overrideConverts the value of this instance to its equivalent string representation (either "High" or "Low").
ToString(IFormatProvider)Converts the value of this instance to its equivalent string representation (either "High" or "Low").

ToString() ​

override

Converts the value of this instance to its equivalent string representation (either "High" or "Low").

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

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

ToString(IFormatProvider) ​

Converts the value of this instance to its equivalent string representation (either "High" or "Low").

csharp
public string ToString(IFormatProvider provider)
vbnet
Public Function ToString(provider As IFormatProvider) As String

Parameters

NameTypeDescription
providerIFormatProvider(Reserved) An IFormatProvider object.

Returns

String

HighString if the value of this instance is true, or LowString if the value of this instance is false.

Implements

ToString(IFormatProvider)

TryParse ​

static

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.

csharp
public static bool TryParse(string value, out Bit result)
vbnet
Public Shared Function TryParse(value As String, result As Bit) As Boolean

Parameters

NameTypeDescription
valueStringA string containing the value to convert.
resultout BitWhen 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 (Nothing in Visual Basic) or is not equal to the value of either the HighString or LowString field.

Returns

Boolean

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

Operators ​

Equality ​

static

Returns a value indicating whether two values of Bit are equal.

csharp
public static bool operator ==(Bit left, Bit right)
vbnet
Public Shared Operator =(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit to compare.
rightBitThe second Bit to compare.

Returns

Boolean

The value true if left and right are equal; otherwise the value false.

GreaterThan ​

static

Determines whether the first specified Bit value is greater than the second specified Bit value.

csharp
public static bool operator >(Bit left, Bit right)
vbnet
Public Shared Operator >(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit value.
rightBitThe second Bit value.

Returns

Boolean

The value true if left is greater than right; otherwise, false.

GreaterThanOrEqual ​

static

Determines whether the first specified Bit value is greater than or equal to the second specified Bit value.

csharp
public static bool operator >=(Bit left, Bit right)
vbnet
Public Shared Operator >=(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit value.
rightBitThe second Bit value.

Returns

Boolean

The value true if left is greater than or equal to right; otherwise, false.

Implicit ​

static · 11 overloads

OverloadDescription
implicit operator Bit(bool)staticConverts a bool to a Bit value.
implicit operator Bit(byte)staticConverts a byte to a Bit value.
implicit operator Bit(sbyte)staticConverts a sbyte to a Bit value.
implicit operator Bit(short)staticConverts a short to a Bit value.
implicit operator Bit(ushort)staticConverts a ushort to a Bit value.
implicit operator Bit(int)staticConverts a int to a Bit value.
implicit operator Bit(uint)staticConverts a uint to a Bit value.
implicit operator Bit(long)staticConverts a long to a Bit value.
implicit operator Bit(ulong)staticConverts a ulong to a Bit value.
implicit operator bool(Bit)staticConverts a Bit to a bool value.
implicit operator int(Bit)staticConverts a Bit to a int value.

implicit operator Bit(bool) ​

static

Converts a bool to a Bit value.

csharp
public static implicit operator Bit(bool value)
vbnet
Public Shared Widening Operator CType(value As Boolean) As Bit

Parameters

NameTypeDescription
valueBooleanThe bool value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(byte) ​

static

Converts a byte to a Bit value.

csharp
public static implicit operator Bit(byte value)
vbnet
Public Shared Widening Operator CType(value As Byte) As Bit

Parameters

NameTypeDescription
valueByteThe byte value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(sbyte) ​

static

Converts a sbyte to a Bit value.

csharp
public static implicit operator Bit(sbyte value)
vbnet
Public Shared Widening Operator CType(value As SByte) As Bit

Parameters

NameTypeDescription
valueSByteThe sbyte value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(short) ​

static

Converts a short to a Bit value.

csharp
public static implicit operator Bit(short value)
vbnet
Public Shared Widening Operator CType(value As Short) As Bit

Parameters

NameTypeDescription
valueInt16The short value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(ushort) ​

static

Converts a ushort to a Bit value.

csharp
public static implicit operator Bit(ushort value)
vbnet
Public Shared Widening Operator CType(value As UShort) As Bit

Parameters

NameTypeDescription
valueUInt16The ushort value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(int) ​

static

Converts a int to a Bit value.

csharp
public static implicit operator Bit(int value)
vbnet
Public Shared Widening Operator CType(value As Integer) As Bit

Parameters

NameTypeDescription
valueInt32The int value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(uint) ​

static

Converts a uint to a Bit value.

csharp
public static implicit operator Bit(uint value)
vbnet
Public Shared Widening Operator CType(value As UInteger) As Bit

Parameters

NameTypeDescription
valueUInt32The uint value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(long) ​

static

Converts a long to a Bit value.

csharp
public static implicit operator Bit(long value)
vbnet
Public Shared Widening Operator CType(value As Long) As Bit

Parameters

NameTypeDescription
valueInt64The long value.

Returns

Bit

The Bit value from the value.

implicit operator Bit(ulong) ​

static

Converts a ulong to a Bit value.

csharp
public static implicit operator Bit(ulong value)
vbnet
Public Shared Widening Operator CType(value As ULong) As Bit

Parameters

NameTypeDescription
valueUInt64The ulong value.

Returns

Bit

The Bit value from the value.

implicit operator bool(Bit) ​

static

Converts a Bit to a bool value.

csharp
public static implicit operator bool(Bit value)
vbnet
Public Shared Widening Operator CType(value As Bit) As Boolean

Parameters

NameTypeDescription
valueBitThe Bit value.

Returns

Boolean

The bool value of the value.

implicit operator int(Bit) ​

static

Converts a Bit to a int value.

csharp
public static implicit operator int(Bit value)
vbnet
Public Shared Widening Operator CType(value As Bit) As Integer

Parameters

NameTypeDescription
valueBitThe Bit value.

Returns

Int32

The int value of the value.

Inequality ​

static

Returns a value indicating whether two values of Bit are not equal.

csharp
public static bool operator !=(Bit left, Bit right)
vbnet
Public Shared Operator <>(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit to compare.
rightBitThe second Bit to compare.

Returns

Boolean

The value true if left and right are not equal; otherwise the value false.

LessThan ​

static

Determines whether the first specified Bit value is less than the second specified Bit value.

csharp
public static bool operator <(Bit left, Bit right)
vbnet
Public Shared Operator <(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit value.
rightBitThe second Bit value.

Returns

Boolean

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

LessThanOrEqual ​

static

Determines whether the first specified Bit value is less than or equal to the second Bit value.

csharp
public static bool operator <=(Bit left, Bit right)
vbnet
Public Shared Operator <=(left As Bit, right As Bit) As Boolean

Parameters

NameTypeDescription
leftBitThe first Bit value.
rightBitThe second Bit value.

Returns

Boolean

The value true if left is less than or equal to right; otherwise the value false.