示例#1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            var bob = new SLL <int>();

            System.Console.WriteLine(bob.HasHead);
            // var node = new Node<int>(5);
            bob.AddToBack(5);
            bob.AddToBack(4);
            bob.AddToBack(3);
            bob.AddToBack(2);
            bob.AddToBack(1);
            bob.AddToFront(6);
            bob.AddToFront(7);
            bob.AddToFront(8);
            bob.PrintSLL();

            var chuck      = new SLL <bool>();
            var trashpanda = new SLL <byte>();
            var nickfurry  = new SLL <float>();
        }
示例#2
0
        static void Main(string[] args)
        {
            var bob         = new SLL <int>();
            var chuckNorris = new SLL <bool>();
            var trashPanda  = new SLL <byte>();
            var nickFurry   = new SLL <float>();
            var sadPanda    = new SLL <string>();
            var users       = new SLL <User>();

            users.AddToBack(new User("Bugs Bunny"));
            users.AddToBack(new User("Elmer Fud"));
            users.AddToBack(new User("Wile E. Coyote"));
            users.ReverseSLL();
            users.PrintSLL();

            bob.AddToBack(2);
            bob.AddToBack(1);
            bob.AddToFront(3);
            bob.AddToFront(4);
            bob.AddToFront(5);
            bob.ReverseSLL();
            bob.PrintSLL();
        }