public void Add(T value) { if (LeftChild == null) { LeftChild = new DemoTree <T>(value); return; } if (RightChild == null) { RightChild = new DemoTree <T>(value); return; } if (LeftChild.Depth() <= RightChild.Depth()) { LeftChild.Add(value); return; } RightChild.Add(value); }
public DemoTreeEnumerator(DemoTree <T> tree) { Tree = tree; }