/// <summary> /// Print the circular linked list . /// </summary> /// <param name="circularLinkedList"></param> public static void DisplayCircularLinkedList(CircularLinkedList <T> circularLinkedList) { //if last is null. if (circularLinkedList.Last == null) { return; } //start point. var startPoint = circularLinkedList.Last.Link; do { Console.WriteLine(startPoint.Info); startPoint = startPoint.Link; } while (!startPoint.Equals(circularLinkedList.Last.Link)); }
//Constructor. public CircularLinkedListUserInterface() { _list = new CircularLinkedList <T>(); }