Example #1
0
 public void AddToEnd(int dataToAdd)
 {
     if (headNode == null)
     {
         headNode = new SNode(dataToAdd);
     }
     else
     {
         headNode.AddToEnd(dataToAdd);
     }
 }
Example #2
0
 public void AddToEnd(int dataToAddToEnd)
 {
     if (next != null)
     {
         next.AddToEnd(dataToAddToEnd);
     }
     else
     {
         next = new SNode(dataToAddToEnd);
     }
 }