I am trying to copy treeview nodes to a treenodecollection for some other processing. When I execute treeview.nodes.clear() on the next line, my treenodecollection becomes null. Could you tell me how to copy tree nodes to a treenodecollection and save copies of nodes even after calling the Clear method of the actual tree nodes?
TreeNodeCollection tnc = null; private TypeIn() { tnc = treeView1.Nodes; treeView1.Nodes.Clear();
c #
Kanags.Net
source share