コード例 #1
0
        static void Main(string[] args)
        {
            MyCustomList <string> customList = new MyCustomList <string>(5);

            customList.Add("ankit");
            customList.Add("anu");
            customList.Add("preetam");
            customList.Add("nandi");
            customList.Add("sumit");

            foreach (var item in customList.GetCustomListEnumerator())
            {
                Console.WriteLine(item);
            }

            Console.ReadKey();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            MyCustomList <string> customList = new MyCustomList <string>();

            customList.Add("A");
            customList.Add("B");
            customList.Add("C");
            customList.Add("D");
            customList.Add("E");
            customList.Add("F");

            foreach (var item in customList.GetCustomListEnumerator())
            {
                Console.WriteLine(item);
            }

            Console.ReadKey();
        }
コード例 #3
0
 public CustomListEnumerator(MyCustomList <T> customList)
 {
     this.list = customList;
 }