System.Windows.Forms.TreeNode.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            return "TreeNode: " + ((this.Text == null) ? "" : this.Text);
        }

Usage Example

Example #1
0
 public void CopyChildren(TreeNode parent, TreeNode original)
 {
     TreeNode newTn;
     foreach (TreeNode tn in original.Nodes)
     {
         newTn = new TreeNode(tn.Text);
         parent.Nodes.Add(newTn);
         CopyChildren(newTn, tn);
         if (newTn.ToString().Contains("."))
         {
             newTn.ImageIndex = 0;
         }
         else
         {
             newTn.ImageIndex = 1;
         }
     }
 }
All Usage Examples Of System.Windows.Forms.TreeNode::ToString