Opc.Ua.Core
Implicit Type Conversion(NodeId,UInt32) Operator
Example 



Opc.Ua Namespace > NodeId Class > Implicit Type Conversion Operator : Implicit Type Conversion(NodeId,UInt32) Operator
The System.UInt32 to compare this node to.
Converts an integer to a numeric node identifier.
Syntax
'Declaration
 
Overloads Public Operator Widening CType( _
   ByVal value As UInteger _
) As NodeId
'Usage
 
public NodeId operator implicit( 
   uint value
)
public:
operator NodeId^ ( 
   uint value
)

Parameters

value
The System.UInt32 to compare this node to.
Remarks
Converts an integer to a numeric node identifier for comparisons.
Example

This produces the following output (taken from C# example):

Comparing NodeId to uint
Comparing 100 to 100 = [equals] True
Comparing 100 to 100 = [ == ] True
Comparing 100 to 101 = [equals] False
Comparing 100 to 101 = [ == ] False

//create some variables
uint id1 = 100, id2=101;
NodeId node1;
            
//create our node
node1 = new NodeId(id1);
            
//now to compare the node to the ids using a simple comparison and Equals:
Utils.LogInfo("Comparing NodeId to uint");
Utils.LogInfo("\tComparing 100 to 100 = [equals] {0}", node1.Equals(id1));
Utils.LogInfo("\tComparing 100 to 100 = [ ==   ] {0}", node1 == id1);
Utils.LogInfo("\tComparing 100 to 101 = [equals] {0}", node1.Equals(id2));
Utils.LogInfo("\tComparing 100 to 101 = [ ==   ] {0}", node1 == id2);
'create some variables
Dim id1 As UInt = 100
Dim id2 As UInt = 102
Dim node1 As NodeId
            
'create our node
node1 = new NodeId(id1)
            
'now to compare the node to the ids using a simple comparison and Equals:
Utils.LogInfo("Comparing NodeId to uint")
Utils.LogInfo("   Comparing 100 to 100 = [equals] {0}", node1.Equals(id1))
Utils.LogInfo("   Comparing 100 to 100 = [  =   ] {0}", node1 = id1)
Utils.LogInfo("   Comparing 100 to 101 = [equals] {0}", node1.Equals(id2))
Utils.LogInfo("   Comparing 100 to 101 = [  =   ] {0}", node1 = id2)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

NodeId Class
NodeId Members
Overload List