To remove the root node without it's children I wrote the following loop:
foreach (TreeNode n in treeView_Chpters.Nodes[0].Nodes)
{
treeView_Chpters.Nodes.Remove(n);
treeView_Chpters.Nodes.Add(n);
}
But if the root node has more children than one, I get an error that says, that n is null. How can I fix this?