示例#1
0
 private void RecPrint(Nod nod, ref String s)
 {
     if (nod.Next != null)
     {
         s += String.Format("{0} , ", nod.Next.Value);
         RecPrint(nod.Next, ref s);
     }
 }
示例#2
0
 private void RecAdd(Nod nod, int value)
 {
     if (nod.Next != null)
     {
         RecAdd(nod.Next, value);
     }
     else
     {
         nod.Next = new Nod(value);
     }
 }
示例#3
0
 public void Add(int value)
 {
     if (root == null)
     {
         root = new Nod(value);
     }
     else
     {
         RecAdd(root, value);
     }
 }