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



Opc.Ua Namespace > NodeId Class > Implicit Type Conversion Operator : Implicit Type Conversion(NodeId,String) Operator
The System.String to compare this node to.
Parses a node id string and initializes a node id.
Syntax
'Declaration
 
Overloads Public Operator Widening CType( _
   ByVal text As String _
) As NodeId
'Usage
 
public NodeId operator implicit( 
   string text
)
public:
operator NodeId^ ( 
   String^ text
)

Parameters

text
The System.String to compare this node to.
Remarks
Compares a Node to a String
Example
//define our 2 String ids, and then define our node to use the first id.
String id1 = "Hello", id2 = "World";
NodeId node1 = new NodeId(id1);
            
//now to compare the node to the guids
Utils.LogInfo("\n\nComparing NodeId to String");
Utils.LogInfo("\tComparing {0} to {1} = [equals] {2}", id1, id1, node1.Equals(id1));
Utils.LogInfo("\tComparing {0} to {1} = [ ==   ] {2}", id1, id1, node1 == id1);
Utils.LogInfo("\tComparing {0} to {1} = [equals] {2}", id1, id2, node1.Equals(id2));
Utils.LogInfo("\tComparing {0} to {1} = [ ==   ] {2}", id1, id2, node1 == id2);
'define our 2 String ids, and then define our node to use the first id.
Dim id1 As String = "Hello"
Dim id2 As String = "World"
Dim node1 As NodeId = New NodeId(id1)
            
'now to compare the node to the guids
Utils.LogInfo("Comparing NodeId to String");
Utils.LogInfo("Comparing {0} to {1} = [equals] {2}", id1, id1, node1.Equals(id1));
Utils.LogInfo("Comparing {0} to {1} = [  =   ] {2}", id1, id1, node1 = id1);
Utils.LogInfo("Comparing {0} to {1} = [equals] {2}", id1, id2, node1.Equals(id2));
Utils.LogInfo("Comparing {0} to {1} = [  =   ] {2}", id1, id2, 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