예제 #1
0
        private void Test01()
        {
            int[]     arr1 = { 1, 2, 3, 4, 5, 6 };
            ArrayList arr2 = new ArrayList()
            {
                1, 2, 3, 4, 5, 6, 7
            };

            int[]          arr3           = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            MyReadOnlyList myReadOnlyList = new MyReadOnlyList(arr3);

            Console.WriteLine(Sum(arr1));
            Console.WriteLine(Sum(arr2));
            Console.WriteLine(Sum(arr3));
            //Console.WriteLine(Sum(myReadOnlyList));
        }
예제 #2
0
 public MyEnumerator(MyReadOnlyList myReadOnlyList)
 {
     _myReadOnlyList = myReadOnlyList;
 }