コード例 #1
0
        /// <summary>
        /// 顺序表 测试
        /// </summary>
        private static void SequenceTest()
        {
            List <string> s = new List <string>();

            SequenceList <Student> list = new SequenceList <Student>(10);

            list.insert(new Student()
            {
                cardID = 1, name = "sun"
            });
            list.insert(0, new Student()
            {
                cardID = 2, name = "hai"
            });
            list.insert(new Student()
            {
                cardID = 4, name = "lang"
            });
            Console.WriteLine((list.get(4)) == null);

            list.insert(6, new Student()
            {
                cardID = 6, name = "hello"
            });

            Console.WriteLine((list.get(3)) == null);

            Console.WriteLine("Length: " + list.length());
        }