static void Main(string[] args) { LinkedNodes <double> ln = new LinkedNodes <double>(); ln.AddNodes(4); ln.AddNodes(15); ln.AddNodes(13.2); ln.AddNodes(12); ln.RemoveNodes(11.9); ln.NodesSize(); ln.PrintNodes(); Console.ReadKey(); }
public void NodesSize() { LinkedNodes <double> ln = new LinkedNodes <double>(); int i = 0; Node current = _first; while (current != null) { current = current.next; i = i + 1; if (current == null) { Console.WriteLine("Node count: " + i); ln.AddNodes(i); } } Console.ReadKey(); }