public bool MoveNext()
 {
     if (_position < _collection.Count())
     {
         _position++;
     }
     return(_position < _collection.Count());
 }
Beispiel #2
0
        public static void Main1()
        {
            OriginCollection <string> names = new OriginCollection <string>();

            names.Add("David");
            names.Add("Bernica");
            names.Add("Raymond");
            names.Add("Clayton");
            foreach (Object name in names)
            {
                Console.WriteLine(name);
            }
            Console.WriteLine("Number of names: " + names.Count());

            names.Remove("Raymond");
            Console.WriteLine("Number of names: " + names.Count());

            names.Clear();
            Console.WriteLine("Number of names: " + names.Count());
        }