Exemple #1
0
        public void check()
        {
            MyGenericList <int> myGenericList = new MyGenericList <int>();

            myGenericList.insert(3);
            myGenericList.insert(4);
            Console.WriteLine(myGenericList.getvalue(1));

            NonGenericList nonGenericList = new NonGenericList();

            nonGenericList.insert(3);
            nonGenericList.insert("sd");
            Console.WriteLine(nonGenericList.getvalue(1));
        }
Exemple #2
0
        public int CompareTo(object obj)
        {
            NonGenericList nonGenericList = obj as NonGenericList;

            return(nonGenericList.CompareTo(this));
        }