Skip to content

Reference

OpcValue Members

Stores a value optionally associated with status and timestamp information.

Reference

OpcValue Members ​

Type
OpcValue
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Constructors ​

OpcValue ​

7 overloads

OverloadDescription
OpcValue(object)Initializes a new instance of the OpcValue class using the value.
OpcValue(object, DateTime)Initializes a new instance of the OpcValue class using the value and the sourceTimestamp of the value.
OpcValue(object, DateTime, OpcStatus)Initializes a new instance of the OpcValue class using the value, sourceTimestamp and status of the value.
OpcValue(object, DateTime, OpcStatusCode)Initializes a new instance of the OpcValue class using the value, sourceTimestamp and statusCode of the value.
OpcValue(object, DateTime, DateTime)Initializes a new instance of the OpcValue class using the value, sourceTimestamp and serverTimestamp of the value.
OpcValue(object, DateTime, DateTime, OpcStatus)Initializes a new instance of the OpcValue class using the value, sourceTimestamp, serverTimestamp and status of the value.
OpcValue(object, DateTime, DateTime, OpcStatusCode)Initializes a new instance of the OpcValue class using the value, sourceTimestamp, serverTimestamp and statusCode of the value.

OpcValue(object) ​

Initializes a new instance of the OpcValue class using the value.

csharp
public OpcValue(object value)
vbnet
Public Sub New(value As Object)

Parameters

NameTypeDescription
valueObjectThe value to represent.

OpcValue(object, DateTime) ​

Initializes a new instance of the OpcValue class using the value and the sourceTimestamp of the value.

csharp
public OpcValue(object value, DateTime sourceTimestamp)
vbnet
Public Sub New(value As Object, sourceTimestamp As Date)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.

OpcValue(object, DateTime, OpcStatus) ​

Initializes a new instance of the OpcValue class using the value, sourceTimestamp and status of the value.

csharp
public OpcValue(object value, DateTime sourceTimestamp, OpcStatus status)
vbnet
Public Sub New(value As Object, sourceTimestamp As Date, status As OpcStatus)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
statusOpcStatusThe status information associated with the value.

OpcValue(object, DateTime, OpcStatusCode) ​

Initializes a new instance of the OpcValue class using the value, sourceTimestamp and statusCode of the value.

csharp
[CLSCompliant(false)]
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    OpcStatusCode statusCode)
vbnet
<CLSCompliant(False)>
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    statusCode As OpcStatusCode)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
statusCodeOpcStatusCodeOne of the OpcStatusCode members which defines the status information associated with the value.

OpcValue(object, DateTime, DateTime) ​

Initializes a new instance of the OpcValue class using the value, sourceTimestamp and serverTimestamp of the value.

csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp)
vbnet
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.

OpcValue(object, DateTime, DateTime, OpcStatus) ​

Initializes a new instance of the OpcValue class using the value, sourceTimestamp, serverTimestamp and status of the value.

csharp
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatus status)
vbnet
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    status As OpcStatus)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.
statusOpcStatusThe status information associated with the value.

OpcValue(object, DateTime, DateTime, OpcStatusCode) ​

Initializes a new instance of the OpcValue class using the value, sourceTimestamp, serverTimestamp and statusCode of the value.

csharp
[CLSCompliant(false)]
public OpcValue(
    object value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatusCode statusCode)
vbnet
<CLSCompliant(False)>
Public Sub New(
    value As Object,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    statusCode As OpcStatusCode)

Parameters

NameTypeDescription
valueObjectThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.
statusCodeOpcStatusCodeOne of the OpcStatusCode members which defines the status information associated with the value.

Properties ​

DataType ​

Gets the type of value represented.

csharp
public OpcDataType DataType { get; }
vbnet
Public ReadOnly Property DataType As OpcDataType

Property value

OpcDataType

One of the members defined by the OpcDataType. In case there Value is a null reference (Nothing in Visual Basic) Null.

DataTypeId ​

virtual

Gets the node identifier of the DataType of the value represented.

csharp
public virtual OpcNodeId DataTypeId { get; }
vbnet
Public Overridable ReadOnly Property DataTypeId As OpcNodeId

Property value

OpcNodeId

An instance of the OpcNodeId representing the node identifier of the DataType.

Rank ​

Gets the rank of the value represented.

csharp
public int Rank { get; }
vbnet
Public ReadOnly Property Rank As Integer

Property value

Int32

The rank of the value or -2 in case there is no type information available for the value represented.

ServerPicoseconds ​

Gets or sets the difference between a high resolution timestamp with a resolution of 10 picoseconds and the ServerTimestamp which only has a 100 ns resolution.

csharp
public ushort ServerPicoseconds { get; set; }
vbnet
Public Property ServerPicoseconds As UShort

Property value

UInt16

The number of 10 picosecond intervals for the ServerTimestamp.

Remarks

The value should be less than 10 000.

ServerTimestamp ​

Gets or sets the timestamp at which the server recorded the value.

csharp
public DateTime? ServerTimestamp { get; set; }
vbnet
Public Property ServerTimestamp As Date?

Property value

Nullable<DateTime>

The timestamp of the server for the value or a null reference (Nothing in Visual Basic) in case there is no timestamp provided by the server.

SourcePicoseconds ​

Gets or sets the difference between a high resolution timestamp with a resolution of 10 picoseconds and the SourceTimestamp which only has a 100 ns resolution.

csharp
public ushort SourcePicoseconds { get; set; }
vbnet
Public Property SourcePicoseconds As UShort

Property value

UInt16

The number of 10 picosecond intervals for the SourceTimestamp.

Remarks

The value should be less than 10 000.

SourceTimestamp ​

Gets or sets the timestamp of the source from that the value originates.

csharp
public DateTime? SourceTimestamp { get; set; }
vbnet
Public Property SourceTimestamp As Date?

Property value

Nullable<DateTime>

The timestamp of the source for the value or a null reference (Nothing in Visual Basic) in case there is no timestamp provided by the source of the value.

Status ​

Gets the status information which defines the servers ability to access/provide the value.

csharp
public OpcStatus Status { get; }
vbnet
Public ReadOnly Property Status As OpcStatus

Property value

OpcStatus

The status information associated with the value.

Remarks

If the status information indicates an error then the value is to be ignored and the server shall set it to a null reference (Nothing in Visual Basic).

Value ​

Gets or sets the value represented.

csharp
public object Value { get; set; }
vbnet
Public Property Value As Object

Property value

Object

The value associated with the metadata represented.

Methods ​

As ​

Retrieves the underlying Value as the type specified by T.

csharp
public T As<T>(T defaultValue = default)
vbnet
Public Function [As](Of T)(defaultValue As T = Nothing) As T

Type parameters

NameDescription
TThe type to use to retrieve the Value.

Parameters

NameTypeDescription
defaultValueTThe value to provide in the case there the Value is a null reference (Nothing in Visual Basic). Optional, default default.

Returns

T

The Value typed as T or defaultValue in case there Value is a null reference (Nothing in Visual Basic) or could not converted to the T specified.

AsValue ​

since v2.8

Retrieves a new OpcValue<T> instance its Value is of the type specified by T.

csharp
public OpcValue<T> AsValue<T>()
vbnet
Public Function AsValue(Of T)() As OpcValue(Of T)

Type parameters

NameDescription
TThe type to use to retrieve a new OpcValue<T> instance.

Returns

OpcValue<T>

A new instance of the OpcValue<T> class its Value is typed as T and its further value information has been adopted from this OpcValue or a null reference (Nothing in Visual Basic) if the Value could not converted to the T specified.

CompareTo ​

virtual · 2 overloads

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

CompareTo(object) ​

virtual

Compares the current OpcValue with the other.

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

Parameters

NameTypeDescription
otherObjectThe OpcValue to compare with this OpcValue.

Returns

Int32

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

Implements

CompareTo(object)

CompareTo(OpcValue) ​

virtual

Compares the current OpcValue with another OpcValue.

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

Parameters

NameTypeDescription
otherOpcValueThe OpcValue to compare with this OpcValue.

Returns

Int32

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

Implements

CompareTo(OpcValue)

Equals ​

2 overloads

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

Equals(object) ​

override

Determines whether the specified other is equal to this OpcValue.

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

Parameters

NameTypeDescription
otherObjectThe OpcValue to compare to the current OpcValue.

Returns

Boolean

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

Overrides

Equals(object)

Equals(OpcValue) ​

virtual

Determines whether the specified other is equal to this OpcValue.

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

Parameters

NameTypeDescription
otherOpcValueThe OpcValue to compare to the current OpcValue.

Returns

Boolean

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

Implements

Equals(OpcValue)

GetHashCode ​

override

Retrieves a hash code for this OpcValue.

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

Returns

Int32

An int that contains the hash code for the OpcValue.

Overrides

GetHashCode()

ToString ​

2 overloads

OverloadDescription
ToString()overrideConverts the value of this instance to its equivalent string representation.
ToString(string, IFormatProvider)virtualConverts the value of this instance to its equivalent string representation using the specified format and culture-specific format information.

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

ToString(string, IFormatProvider) ​

virtual

Converts the value of this instance to its equivalent string representation using the specified format and culture-specific format information.

csharp
public virtual string ToString(string format, IFormatProvider formatProvider)
vbnet
Public Overridable Function ToString(
    format As String,
    formatProvider As IFormatProvider) As String

Parameters

NameTypeDescription
formatStringA standard or custom format string.
formatProviderIFormatProviderAn object that supplies culture-specific formatting information.

Returns

String

The string representation of the value of this instance as specified by format and provider.

Exceptions

ExceptionCondition
FormatExceptionThe format is invalid or not supported.

Implements

ToString(string, IFormatProvider)

Operators ​

Equality ​

static

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

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue to compare.
rightOpcValueThe second OpcValue to compare.

Returns

Boolean

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

Explicit ​

static

Converts a OpcValue to an DataValue object.

csharp
[CLSCompliant(false)]
public static explicit operator DataValue(OpcValue value)
vbnet
<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcValue) As DataValue

Parameters

NameTypeDescription
valueOpcValueA OpcValue that represents the value.

Returns

DataValue

An instance of the DataValue class initialized from the value.

GreaterThan ​

static

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

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue object.
rightOpcValueThe second OpcValue object.

Returns

Boolean

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

GreaterThanOrEqual ​

static

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

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue object.
rightOpcValueThe second OpcValue object.

Returns

Boolean

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

Implicit ​

static · 29 overloads

OverloadDescription
implicit operator OpcValue(bool)staticConverts a bool to an OpcValue object.
implicit operator OpcValue(bool?)staticConverts a null-able bool to an OpcValue object.
implicit operator OpcValue(byte)staticConverts a byte to an OpcValue object.
implicit operator OpcValue(byte?)staticConverts a null-able byte to an OpcValue object.
implicit operator OpcValue(sbyte)staticConverts a sbyte to an OpcValue object.
implicit operator OpcValue(sbyte?)staticConverts a null-able sbyte to an OpcValue object.
implicit operator OpcValue(char)staticConverts a char to an OpcValue object.
implicit operator OpcValue(char?)staticConverts a null-able char to an OpcValue object.
implicit operator OpcValue(decimal)staticConverts a decimal to an OpcValue object.
implicit operator OpcValue(decimal?)staticConverts a null-able decimal to an OpcValue object.
implicit operator OpcValue(double)staticConverts a double to an OpcValue object.
implicit operator OpcValue(double?)staticConverts a null-able double to an OpcValue object.
implicit operator OpcValue(float)staticConverts a float to an OpcValue object.
implicit operator OpcValue(float?)staticConverts a null-able float to an OpcValue object.
implicit operator OpcValue(int)staticConverts a int to an OpcValue object.
implicit operator OpcValue(int?)staticConverts a null-able int to an OpcValue object.
implicit operator OpcValue(uint)staticConverts a uint to an OpcValue object.
implicit operator OpcValue(uint?)staticConverts a null-able uint to an OpcValue object.
implicit operator OpcValue(long)staticConverts a ulong to an OpcValue object.
implicit operator OpcValue(long?)staticConverts a null-able ulong to an OpcValue object.
implicit operator OpcValue(ulong)staticConverts a ulong to an OpcValue object.
implicit operator OpcValue(ulong?)staticConverts a null-able ulong to an OpcValue object.
implicit operator OpcValue(short)staticConverts a ushort to an OpcValue object.
implicit operator OpcValue(short?)staticConverts a null-able ushort to an OpcValue object.
implicit operator OpcValue(ushort)staticConverts a ushort to an OpcValue object.
implicit operator OpcValue(ushort?)staticConverts a null-able ushort to an OpcValue object.
implicit operator OpcValue(string)staticConverts a string to an OpcValue object.
implicit operator OpcValue(DataValue)staticConverts a DataValue to an OpcValue object.
implicit operator OpcValue(Variant)staticConverts a Variant to an OpcValue object.

implicit operator OpcValue(bool) ​

static

Converts a bool to an OpcValue object.

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

Parameters

NameTypeDescription
valueBooleanA bool that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(bool?) ​

static

Converts a null-able bool to an OpcValue object.

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

Parameters

NameTypeDescription
valueNullable<Boolean>A null-able bool that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(byte) ​

static

Converts a byte to an OpcValue object.

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

Parameters

NameTypeDescription
valueByteA byte that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(byte?) ​

static

Converts a null-able byte to an OpcValue object.

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

Parameters

NameTypeDescription
valueNullable<Byte>A null-able byte that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(sbyte) ​

static

Converts a sbyte to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(sbyte value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte) As OpcValue

Parameters

NameTypeDescription
valueSByteA sbyte that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(sbyte?) ​

static

Converts a null-able sbyte to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(sbyte? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As SByte?) As OpcValue

Parameters

NameTypeDescription
valueNullable<SByte>A null-able sbyte that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(char) ​

static

Converts a char to an OpcValue object.

csharp
public static implicit operator OpcValue(char value)
vbnet
Public Shared Widening Operator CType(value As Char) As OpcValue

Parameters

NameTypeDescription
valueCharA char that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(char?) ​

static

Converts a null-able char to an OpcValue object.

csharp
public static implicit operator OpcValue(char? value)
vbnet
Public Shared Widening Operator CType(value As Char?) As OpcValue

Parameters

NameTypeDescription
valueNullable<Char>A null-able char that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(decimal) ​

static

Converts a decimal to an OpcValue object.

csharp
public static implicit operator OpcValue(decimal value)
vbnet
Public Shared Widening Operator CType(value As Decimal) As OpcValue

Parameters

NameTypeDescription
valueDecimalA decimal that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(decimal?) ​

static

Converts a null-able decimal to an OpcValue object.

csharp
public static implicit operator OpcValue(decimal? value)
vbnet
Public Shared Widening Operator CType(value As Decimal?) As OpcValue

Parameters

NameTypeDescription
valueNullable<Decimal>A null-able decimal that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(double) ​

static

Converts a double to an OpcValue object.

csharp
public static implicit operator OpcValue(double value)
vbnet
Public Shared Widening Operator CType(value As Double) As OpcValue

Parameters

NameTypeDescription
valueDoubleA double that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(double?) ​

static

Converts a null-able double to an OpcValue object.

csharp
public static implicit operator OpcValue(double? value)
vbnet
Public Shared Widening Operator CType(value As Double?) As OpcValue

Parameters

NameTypeDescription
valueNullable<Double>A null-able double that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(float) ​

static

Converts a float to an OpcValue object.

csharp
public static implicit operator OpcValue(float value)
vbnet
Public Shared Widening Operator CType(value As Single) As OpcValue

Parameters

NameTypeDescription
valueSingleA float that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(float?) ​

static

Converts a null-able float to an OpcValue object.

csharp
public static implicit operator OpcValue(float? value)
vbnet
Public Shared Widening Operator CType(value As Single?) As OpcValue

Parameters

NameTypeDescription
valueNullable<Single>A null-able float that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(int) ​

static

Converts a int to an OpcValue object.

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

Parameters

NameTypeDescription
valueInt32A int that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(int?) ​

static

Converts a null-able int to an OpcValue object.

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

Parameters

NameTypeDescription
valueNullable<Int32>A null-able int that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(uint) ​

static

Converts a uint to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(uint value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger) As OpcValue

Parameters

NameTypeDescription
valueUInt32A uint that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(uint?) ​

static

Converts a null-able uint to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(uint? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UInteger?) As OpcValue

Parameters

NameTypeDescription
valueNullable<UInt32>A null-able uint that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(long) ​

static

Converts a ulong to an OpcValue object.

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

Parameters

NameTypeDescription
valueInt64A ulong that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(long?) ​

static

Converts a null-able ulong to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(long? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As Long?) As OpcValue

Parameters

NameTypeDescription
valueNullable<Int64>A null-able ulong that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(ulong) ​

static

Converts a ulong to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(ulong value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong) As OpcValue

Parameters

NameTypeDescription
valueUInt64A ulong that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(ulong?) ​

static

Converts a null-able ulong to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(ulong? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As ULong?) As OpcValue

Parameters

NameTypeDescription
valueNullable<UInt64>A null-able ulong that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(short) ​

static

Converts a ushort to an OpcValue object.

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

Parameters

NameTypeDescription
valueInt16A ushort that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(short?) ​

static

Converts a null-able ushort to an OpcValue object.

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

Parameters

NameTypeDescription
valueNullable<Int16>A null-able ushort that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(ushort) ​

static

Converts a ushort to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(ushort value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort) As OpcValue

Parameters

NameTypeDescription
valueUInt16A ushort that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(ushort?) ​

static

Converts a null-able ushort to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(ushort? value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As UShort?) As OpcValue

Parameters

NameTypeDescription
valueNullable<UInt16>A null-able ushort that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(string) ​

static

Converts a string to an OpcValue object.

csharp
public static implicit operator OpcValue(string value)
vbnet
Public Shared Widening Operator CType(value As String) As OpcValue

Parameters

NameTypeDescription
valueStringA string that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(DataValue) ​

static

Converts a DataValue to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(DataValue value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As DataValue) As OpcValue

Parameters

NameTypeDescription
valueDataValueA DataValue that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

implicit operator OpcValue(Variant) ​

static

Converts a Variant to an OpcValue object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue(Variant value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As [Variant]) As OpcValue

Parameters

NameTypeDescription
valueVariantA Variant that represents the value.

Returns

OpcValue

An instance of the OpcValue class initialized from the value.

Inequality ​

static

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

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue to compare.
rightOpcValueThe second OpcValue 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 OpcValue object is less than the second specified OpcValue object.

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue object.
rightOpcValueThe second OpcValue 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 OpcValue object is less than or equal to the second OpcValue object.

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

Parameters

NameTypeDescription
leftOpcValueThe first OpcValue object.
rightOpcValueThe second OpcValue 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).