TreeNodeCollection nodes = treeView1.Nodes; nodes.RemoveAt(0); //removes the first TreeNode object in the collection
TreeNodeCollection nodes = treeView1.Nodes; while (nodes.Count != 0) { nodes.RemoveAt(0); }The package library for this class is System.Windows.Forms.