OPC Studio User's Guide and Reference
Add Method (Node)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.NodeSpace Namespace > Node Class : Add Method
The sub-node to be added. It must not be null and should be of a type that is allowed as a sub-node under this node type.

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

Adds a sub-node to this node.
Syntax
'Declaration
 
Public Sub Add( _
   ByVal node As Node _
) 
'Usage
 
Dim instance As Node
Dim node As Node
 
instance.Add(node)
public void Add( 
   Node node
)
public:
void Add( 
   Node^ node
) 

Parameters

node
The sub-node to be added. It must not be null and should be of a type that is allowed as a sub-node under this node type.

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

Exceptions
ExceptionDescription
This exception is thrown when a node (of the same branch/leaf kind) with the same name has already been added, or when the node being node is not of the type that is allowed as a sub-node under this node type.
Thrown when the node argument is null.
Remarks

This method is a part of collection initializer implementation.

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