TreeView tv = new TreeView(); TreeNode n = new TreeNode(); Console.WriteLine("Roots: " + tv.Nodes.Count); tv.Nodes.Add(n); n = new TreeNode(); Console.WriteLine("Roots: " + tv.Nodes.Count); tv.Nodes.Add(n); Console.WriteLine("Roots: " + tv.Nodes.Count); TreeNode sn = new TreeNode(); Console.WriteLine("SubNodes: " + n.Nodes.Count); n.Nodes.Add(sn); Console.WriteLine("SubNodes: " + n.Nodes.Count); sn = new TreeNode(); n.Nodes.Add(sn); Console.WriteLine("SubNodes: " + n.Nodes.Count);
TreeNode.Nodes.Add(childNode) TreeNode.Nodes.Clear() TreeNode.Nodes.Count
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)