public void PrintSectionTree(SectionTreeCollection ltree) { string leftPad = ""; if (ltree.Level > 0) { leftPad = "".PadLeft(ltree.Level); } Console.WriteLine("".PadLeft(50, '-')); Console.WriteLine("SectionName:" + ltree.SectionName + " ChildCount:" + ltree.GetChildCount()); foreach (KeyData lkey in ltree.Keys) { Console.Write(leftPad + "Key:" + lkey.KeyName); foreach (string lValue in lkey.Values) { Console.Write(" Value:" + lValue); } Console.WriteLine(""); } foreach (SectionTreeCollection childTree in ltree.GetChildren()) { PrintSectionTree(childTree); } }
public void PrintSectionTree(SectionTreeCollection ltree) { string leftPad = ""; if (ltree.Level > 0) { leftPad = "".PadLeft(ltree.Level); } Console.WriteLine("SectionName:" + ltree.SectionName + " ChildCount:" + ltree.GetChildCount()); foreach (SectionTreeCollection childTree in ltree.GetChildren()) { PrintSectionTree(childTree); } }