コード例 #1
0
 public Tree()
 {
     Nodes = new TreeNodes <T>();
 }
コード例 #2
0
 // 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>();
 }
コード例 #3
0
 // 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>();
 }