OPC Studio User's Guide and Reference
TryGetValue Method (_UAQualifiedNameSet)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.AddressSpace.ComTypes Namespace > _UAQualifiedNameSet Interface : TryGetValue Method
The value to search for.

The value of this parameter cannot be null (Nothing in Visual Basic).

The value from the set that the search found, or the default value of T when the search yielded no match.

The value of this parameter can be null (Nothing in Visual Basic).

Searches the set for a given value and returns the equal value it finds, if any.
Syntax
'Declaration
 
Function TryGetValue( _
   ByVal equalValue As Object, _
   ByRef actualValue As Object _
) As Boolean
'Usage
 
Dim instance As _UAQualifiedNameSet
Dim equalValue As Object
Dim actualValue As Object
Dim value As Boolean
 
value = instance.TryGetValue(equalValue, actualValue)
bool TryGetValue( 
   object equalValue,
   out object actualValue
)
bool TryGetValue( 
   Object^ equalValue,
   [Out] Object^ actualValue
) 

Parameters

equalValue
The value to search for.

The value of this parameter cannot be null (Nothing in Visual Basic).

actualValue
The value from the set that the search found, or the default value of T when the search yielded no match.

The value of this parameter can be null (Nothing in Visual Basic).

Return Value

A value indicating whether the search was successful.
Remarks

This can be useful when you want to reuse a previously stored reference instead of a newly constructed one (so that more sharing of references can occur) or to look up a value that has more complete data than the value you currently have, although their comparer functions indicate they are equal.

This member or type is for use from COM. It is not meant to be used from .NET or Python. Refer to the corresponding .NET member or type instead, if you are developing in .NET or Python.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also