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

Glossary Item Box

Converts an integer to a numeric node identifier.

Syntax

Visual Basic (Usage)Copy Code
C# 
public NodeId operator implicit( 
   uint value
)

Parameters

value
The System.UInt32 to compare this node to.

Remarks

Converts an integer to a numeric node identifier for comparissons.

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

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