Skip to content

Reference

OpcEnumValue Members

Represent a human-readable representation of an enumeration.

Reference

OpcEnumValue Members ​

Type
OpcEnumValue
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Constructors ​

OpcEnumValue ​

3 overloads

OverloadDescription
OpcEnumValue(string, long)Initializes a new instance of the OpcEnumValue class using the name and value provided.
OpcEnumValue(string, long, OpcText)Initializes a new instance of the OpcEnumValue class using the name, value and displayName provided.
OpcEnumValue(string, long, OpcText, OpcText)Initializes a new instance of the OpcEnumValue class using the name, value, displayName and description provided.

Exceptions (all overloads)

ExceptionCondition
ArgumentExceptionThe name is an empty string.
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

OpcEnumValue(string, long) ​

Initializes a new instance of the OpcEnumValue class using the name and value provided.

csharp
public OpcEnumValue(string name, long value)
vbnet
Public Sub New(name As String, value As Long)

Parameters

NameTypeDescription
nameStringThe value used for the Name and DisplayName properties.
valueInt64The value of the enumeration used for the Value property.

OpcEnumValue(string, long, OpcText) ​

Initializes a new instance of the OpcEnumValue class using the name, value and displayName provided.

csharp
public OpcEnumValue(string name, long value, OpcText displayName)
vbnet
Public Sub New(name As String, value As Long, displayName As OpcText)

Parameters

NameTypeDescription
nameStringThe value used for the Name property.
valueInt64The value of the enumeration used for the Value property.
displayNameOpcTextThe human-readable representation of the value of the enumeration.

OpcEnumValue(string, long, OpcText, OpcText) ​

Initializes a new instance of the OpcEnumValue class using the name, value, displayName and description provided.

csharp
public OpcEnumValue(
    string name,
    long value,
    OpcText displayName,
    OpcText description)
vbnet
Public Sub New(
    name As String,
    value As Long,
    displayName As OpcText,
    description As OpcText)

Parameters

NameTypeDescription
nameStringThe value used for the Name property.
valueInt64The value of the enumeration used for the Value property.
displayNameOpcTextThe human-readable representation of the value of the enumeration.
descriptionOpcTextA localized description of the enumeration value.

Remarks

In case description is a null reference (Nothing in Visual Basic), the value of Null is used instead.

Properties ​

Description ​

Gets a localized description of the enumeration value.

csharp
public OpcText Description { get; }
vbnet
Public ReadOnly Property Description As OpcText

Property value

OpcText

An instance of the 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.

csharp
public OpcText DisplayName { get; }
vbnet
Public ReadOnly Property DisplayName As OpcText

Property value

OpcText

An instance of the OpcText associated with the human-readable representation.

Name ​

Gets an internal name for the value of the enumeration.

csharp
public string Name { get; }
vbnet
Public ReadOnly Property Name As String

Property value

String

The string of the internal name.

Value ​

Gets the value representation of an enumeration.

csharp
public long Value { get; }
vbnet
Public ReadOnly Property Value As Long

Property value

Int64

The long value representation.

Methods ​

CompareTo ​

virtual · 2 overloads

OverloadDescription
CompareTo(object)virtualCompares the current OpcEnumValue with the other.
CompareTo(OpcEnumValue)virtualCompares the current OpcEnumValue with another OpcEnumValue.

CompareTo(object) ​

virtual

Compares the current OpcEnumValue with the other.

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

Parameters

NameTypeDescription
otherObjectThe OpcEnumValue to compare with this OpcEnumValue.

Returns

Int32

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

Implements

CompareTo(object)

CompareTo(OpcEnumValue) ​

virtual

Compares the current OpcEnumValue with another OpcEnumValue.

csharp
public virtual int CompareTo(OpcEnumValue other)
vbnet
Public Overridable Function CompareTo(other As OpcEnumValue) As Integer

Parameters

NameTypeDescription
otherOpcEnumValueThe OpcEnumValue to compare with this OpcEnumValue.

Returns

Int32

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

Implements

CompareTo(OpcEnumValue)

Equals ​

2 overloads

OverloadDescription
Equals(object)overrideDetermines whether the specified other is equal to this OpcEnumValue.
Equals(OpcEnumValue)virtualDetermines whether the specified other is equal to this OpcEnumValue.

Equals(object) ​

override

Determines whether the specified other is equal to this OpcEnumValue.

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

Parameters

NameTypeDescription
otherObjectThe OpcEnumValue to compare to the current OpcEnumValue.

Returns

Boolean

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

Overrides

Equals(object)

Equals(OpcEnumValue) ​

virtual

Determines whether the specified other is equal to this OpcEnumValue.

csharp
public virtual bool Equals(OpcEnumValue other)
vbnet
Public Overridable Function Equals(other As OpcEnumValue) As Boolean

Parameters

NameTypeDescription
otherOpcEnumValueThe OpcEnumValue to compare to the current OpcEnumValue.

Returns

Boolean

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

Implements

Equals(OpcEnumValue)

GetHashCode ​

override

Retrieves a hash code for this OpcEnumValue.

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

Returns

Int32

An int that contains the hash code for the OpcEnumValue.

Overrides

GetHashCode()

ToString ​

override

Converts the value of this instance to its equivalent string representation.

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

Returns

String

The string representation of the value of this instance.

Overrides

ToString()

Operators ​

Equality ​

static

Returns a value indicating whether two instance of OpcEnumValue are equal.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue to compare.
rightOpcEnumValueThe second OpcEnumValue to compare.

Returns

Boolean

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

GreaterThan ​

static

Determines whether the first specified OpcEnumValue object is greater than the second specified OpcEnumValue object.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue object.
rightOpcEnumValueThe second OpcEnumValue object.

Returns

Boolean

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

GreaterThanOrEqual ​

static

Determines whether the first specified OpcEnumValue object is greater than or equal to the second specified OpcEnumValue object.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue object.
rightOpcEnumValueThe second OpcEnumValue object.

Returns

Boolean

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

Inequality ​

static

Returns a value indicating whether two instances of OpcEnumValue are not equal.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue to compare.
rightOpcEnumValueThe second OpcEnumValue 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 OpcEnumValue object is less than the second specified OpcEnumValue object.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue object.
rightOpcEnumValueThe second OpcEnumValue object.

Returns

Boolean

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

Exceptions

ExceptionCondition
ArgumentNullExceptionThe left is a null reference (Nothing in Visual Basic).

LessThanOrEqual ​

static

Determines whether the first specified OpcEnumValue object is less than or equal to the second OpcEnumValue object.

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

Parameters

NameTypeDescription
leftOpcEnumValueThe first OpcEnumValue object.
rightOpcEnumValueThe second OpcEnumValue object.

Returns

Boolean

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

Exceptions

ExceptionCondition
ArgumentNullExceptionThe left is a null reference (Nothing in Visual Basic).