System.Windows.Forms.TreeNode.Clone Method

Copies the tree node and the entire subtree rooted at this tree node.

Syntax

public virtual object Clone ()

Returns

The object that represents the cloned System.Windows.Forms.TreeNode.

Remarks

The tree structure from the tree node being cloned and below is copied. Any child tree nodes assigned to the System.Windows.Forms.TreeNode being cloned are included in the new tree node and subtree.

The TreeNode.Clone method performs a shallow copy of the node. If the value of the TreeNode.Tag property is a reference type, both the original and cloned copy will point to the same single instance of the TreeNode.Tag value.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0