Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            MyArrayList <string> array = new MyArrayList <string>(10);

            array.Add("Jack");
            array.Add("Tom");
            foreach (string str in array)
            {
                Console.WriteLine(str);
            }
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            MyArrayList array = new MyArrayList(10);

            array.Add("Jack");
            array.Add("Tom");
            foreach (object i in array)
            {
                Console.WriteLine(i);
            }
        }