public Tree() { Nodes = new TreeNodes <T>(); }
// weird : see note on ctor with one parameter // in the Node class above public Tree(string treeName) : base() { Name = treeName; // had to insert this : see note above Nodes = new TreeNodes <T>(); }
// weird : calling base() here does NOT seem to call the // parameterless ctor above : the Nodes collection is, thus, // not instantiated : will cause errors at run-time ! public Node(T keyValue) : base() { _key = keyValue; // had to insert this : see note above Nodes = new TreeNodes <T>(); }