Skip to content

Reference

OpcText Members

Represents a human readable string value optionally associated with a Culture and localization relevant information.

Reference

OpcText Members ​

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

Constructors ​

OpcText ​

3 overloads

OverloadDescription
OpcText(string)Initializes a new instance of the OpcText class using the value.
OpcText(string, string)Initializes a new instance of the OpcText class using the value and the cultureName of the value.
OpcText(string, string, string)Initializes a new instance of the OpcText class using the value, cultureName and key of the value.

OpcText(string) ​

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

csharp
public OpcText(string value)
vbnet
Public Sub New(value As String)

Parameters

NameTypeDescription
valueStringThe value to represent.

OpcText(string, string) ​

Initializes a new instance of the OpcText class using the value and the cultureName of the value.

csharp
public OpcText(string value, string cultureName)
vbnet
Public Sub New(value As String, cultureName As String)

Parameters

NameTypeDescription
valueStringThe value to represent.
cultureNameStringThe name of the culture used to localize the value.

OpcText(string, string, string) ​

Initializes a new instance of the OpcText class using the value, cultureName and key of the value.

csharp
public OpcText(string value, string cultureName, string key)
vbnet
Public Sub New(value As String, cultureName As String, key As String)

Parameters

NameTypeDescription
valueStringThe value to represent.
cultureNameStringThe name of the culture used to localize the value.
keyStringThe key information associated with the value which can be used to look up alternative localizations.

Properties ​

Culture ​

Gets the culture which is used to localize the Value.

csharp
public CultureInfo Culture { get; }
vbnet
Public ReadOnly Property Culture As CultureInfo

Property value

CultureInfo

An instance of the CultureInfo if CultureName references to a known culture; otherwise the InvariantCulture.

CultureName ​

Gets the name of the culture used to localize the Value.

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

Property value

String

The Name of the culture used to localize the Value.

IsNull ​

Gets a value indicating whether the Value represented is a null reference (Nothing in Visual Basic).

csharp
public bool IsNull { get; }
vbnet
Public ReadOnly Property IsNull As Boolean

Property value

Boolean

The value true if the Value is a null reference (Nothing in Visual Basic); otherwise the value false.

Key ​

Gets the key information associated with the OpcText which can be used to look up alternative localizations of the Value.

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

Property value

String

A key used to look up alternative localizations of the Value.

Null ​

static

Gets a value used to identify an undefined OpcText.

csharp
public static OpcText Null { get; }
vbnet
Public Shared ReadOnly Property Null As OpcText

Property value

OpcText

An instance of the OpcText class.

Value ​

Gets the value represented.

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

Property value

String

The value associated with the metadata represented.

Methods ​

CompareTo ​

2 overloads

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

CompareTo(object) ​

Compares the current OpcText with the other.

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

Parameters

NameTypeDescription
otherObjectThe OpcText to compare with this OpcText.

Returns

Int32

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

Implements

CompareTo(object)

CompareTo(OpcText) ​

Compares the current OpcText with another OpcText.

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

Parameters

NameTypeDescription
otherOpcTextThe OpcText to compare with this OpcText.

Returns

Int32

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

Equals ​

2 overloads

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

Equals(object) ​

override

Determines whether the specified other is equal to this OpcText.

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

Parameters

NameTypeDescription
otherObjectThe OpcText to compare to the current OpcText.

Returns

Boolean

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

Overrides

Equals(object)

Equals(OpcText) ​

Determines whether the specified other is equal to this OpcText.

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

Parameters

NameTypeDescription
otherOpcTextThe OpcText to compare to the current OpcText.

Returns

Boolean

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

Format ​

Replaces the format items in this OpcText with the string representation of a corresponding object in the specified array.

csharp
public OpcText Format(params object[] args)
vbnet
Public Function Format(ParamArray args As Object()) As OpcText

Parameters

NameTypeDescription
argsparams Object[]An object array that contains zero or more objects to format.

Returns

OpcText

A new instance of the OpcText class with the same metadata as this OpcText instance with its Value formatted with the args specified.

GetHashCode ​

override

Retrieves a hash code for this OpcText.

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

Returns

Int32

An int that contains the hash code for the OpcText.

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 OpcText are equal.

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText to compare.
rightOpcTextThe second OpcText to compare.

Returns

Boolean

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

GreaterThan ​

static

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

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText object.
rightOpcTextThe second OpcText object.

Returns

Boolean

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

GreaterThanOrEqual ​

static

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

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText object.
rightOpcTextThe second OpcText object.

Returns

Boolean

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

Implicit ​

static · 4 overloads

OverloadDescription
implicit operator OpcText(string)staticConverts a string to an OpcText object.
implicit operator OpcText(LocalizedText)staticConverts a LocalizedText to an OpcText object.
implicit operator LocalizedText(OpcText)staticConverts a OpcText to an LocalizedText object.
implicit operator string(OpcText)staticConverts a OpcText to an LocalizedText object.

implicit operator OpcText(string) ​

static

Converts a string to an OpcText object.

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

Parameters

NameTypeDescription
valueStringA string that represents the value.

Returns

OpcText

An instance of the OpcText class initialized from the value.

implicit operator OpcText(LocalizedText) ​

static

Converts a LocalizedText to an OpcText object.

csharp
public static implicit operator OpcText(LocalizedText value)
vbnet
Public Shared Widening Operator CType(value As LocalizedText) As OpcText

Parameters

NameTypeDescription
valueLocalizedTextA LocalizedText that represents the value.

Returns

OpcText

An instance of the OpcText class initialized from the value.

implicit operator LocalizedText(OpcText) ​

static

Converts a OpcText to an LocalizedText object.

csharp
public static implicit operator LocalizedText(OpcText value)
vbnet
Public Shared Widening Operator CType(value As OpcText) As LocalizedText

Parameters

NameTypeDescription
valueOpcTextA OpcText that represents the value.

Returns

LocalizedText

An instance of the LocalizedText class initialized from the value.

implicit operator string(OpcText) ​

static

Converts a OpcText to an LocalizedText object.

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

Parameters

NameTypeDescription
valueOpcTextA OpcText that represents the value.

Returns

String

An instance of the LocalizedText class initialized from the value.

Inequality ​

static

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

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText to compare.
rightOpcTextThe second OpcText 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 OpcText object is less than the second specified OpcText object.

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText object.
rightOpcTextThe second OpcText 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 OpcText object is less than or equal to the second OpcText object.

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

Parameters

NameTypeDescription
leftOpcTextThe first OpcText object.
rightOpcTextThe second OpcText 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).