You could simplify this:
private void makeTree(List<string> headings, List<string> items)
{
foreach (var s0 in headings)
{
TreeNode newNode = new TreeNode(s0);
treeView1.Nodes.Add(newNode);
foreach (var s1 in items)
{
newNode.Nodes.Add(new TreeNode(s1));
}
}
}
You'd call it like this:
makeTree(
new List<string> {"one", "two", "three"},
new List<string> {"sub1", "sub2"});