public IEnumerable <TreeLevel3> TreeLevel3Enumerator() { for (int i = 0; i < treeLevel2List.Count; i++) { TreeLevel2 lvl2 = treeLevel2List[i]; for (int j = 0; j < lvl2.treeLevel3List.Count; j++) { yield return(lvl2.treeLevel3List[j]); } } yield break; }
public void GetLevel2Children() { TreeLevel2 t = new TreeLevel2(); if (t.CheckRootIsChilden(7)) { Array Child = t.GetLevel2(7); foreach (int i in Child) { Debug.WriteLine("{0} ", i); } } else { Debug.WriteLine("Root has no children"); } }