EasyUA Reference
Implicit Type Conversion(NodeId,String) Operator
See Also  Example Send Feedback
Opc.Ua.Core.Net4 Assembly > Opc.Ua Namespace > NodeId Class > Implicit Type Conversion Operator : Implicit Type Conversion(NodeId,String) Operator
text
The System.String to compare this node to.

Glossary Item Box

Parses a node id string and initializes a node id.

Syntax

Visual Basic (Usage)Copy Code
C# 
public NodeId operator implicit( 
   string text
)

Parameters

text
The System.String to compare this node to.

Remarks

Compares a Node to a String

Example

C#Copy Code
//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.Trace("\n\nComparing NodeId to String");
Utils.Trace("\tComparing {0} to {0} = [equals] {2}", id1, id1, node1.Equals(id1));
Utils.Trace("\tComparing {0} to {0} = [ ==   ] {2}", id1, id1, node1 == id1);
Utils.Trace("\tComparing {0} to {1} = [equals] {2}", id1, id2, node1.Equals(id2));
Utils.Trace("\tComparing {0} to {1} = [ ==   ] {2}", id1, id2, node1 == id2);
Visual BasicCopy Code
'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.Trace("Comparing NodeId to String");
Utils.Trace(String.Format("Comparing {0} to {0} = [equals] {2}", id1, id1, node1.Equals(id1)));
Utils.Trace(String.Format("Comparing {0} to {0} = [  =   ] {2}", id1, id1, node1 = id1));
Utils.Trace(String.Format("Comparing {0} to {1} = [equals] {2}", id1, id2, node1.Equals(id2)));
Utils.Trace(String.Format("Comparing {0} to {1} = [  =   ] {2}", id1, id2, node1 = id2));

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x

See Also

Copyright © 2018 Advosol Inc. All Rights Reserved.