public void PrintList() { if (headNode != null) { headNode.PrintNode(); } }
public void PrintNode() { Console.Write(data + "->"); if (next != null) { next.PrintNode(); } }