Esempio n. 1
0
 /// <summary>
 /// Print all data values in the linked list
 /// </summary>
 public void PrintList()
 {
     current = m_header;
     do
     {
         Console.WriteLine(current.GetData());
         current = current.GetNext();
     }while (!(current == m_header));
 }
Esempio n. 2
0
 /// <summary>
 /// This private method is used to run a search through the linked list to find an object specified in Item
 /// </summary>
 /// <param name="Item">Generic object that is searched for in the Linked list</param>
 /// <returns>Generic node used in other methods</returns>
 private SingularLinkNode <T> Find(T Item)
 {
     current = m_header;
     while ((!current.GetData().Equals(Item)) && ((!(current.GetNext() == null))))
     {
         current = current.GetNext();
     }
     if (!current.GetData().Equals(Item))
     {
         current = null;
     }
     return(current);
 }