Exemplo n.º 1
0
        public void GenericInterface()
        {
            var bag = new ListBase <string> {
                "a", "b", "c"
            };
            var enumerator = bag.GetEnumerator();

            var counter = 0;

            while (enumerator.MoveNext())
            {
                counter++;
            }

            Assert.AreEqual(counter, 3);
        }
Exemplo n.º 2
0
        public void Simple()
        {
            var listBase = new ListBase <string> {
                "a", "b", "c"
            };
            var enumerator = listBase.GetEnumerator();

            var counter = 0;

            while (enumerator.MoveNext())
            {
                counter++;
            }

            Assert.AreEqual(counter, 3);
        }