Exemplo n.º 1
0
        static void Main(string[] args)
        {
            LinkedList ll = new LinkedList();

            NodeString toAdd = new NodeString("first");
            ll.AddNode(toAdd);
            toAdd = new NodeString("2nd");
            ll.AddNode(toAdd);
            toAdd = new NodeString("third");
            ll.AddToBack(toAdd);
            toAdd = new NodeString("4th");
            ll.AddAt(2, toAdd);
            toAdd = new NodeString("5th");
            ll.AddAt(7, toAdd);
            Console.WriteLine(ll.ToString());
            ll.Delete();
            ll.DeleteAt(8);
            ll.DeleteFromEnd();

            Console.WriteLine(ll.ToString());
            Console.WriteLine("");
            Console.WriteLine("======End of Program======");
        }