Пример #1
0
        public IEnumerator <Book> GetEnumerator()
        {
            this.Sort();
            IEnumerator <Book> bookEnumerator = new LibraryIterator(this.books);

            return(bookEnumerator);
        }
Пример #2
0
        public IEnumerator <Book> GetEnumerator()
        {
            LibraryIterator libraryIterator = new LibraryIterator(this.books.ToArray());

            return(libraryIterator);

            //for (int i = 0; i < this.books.Count; i++)
            //{
            //    yield return this.books[i];
            //}
        }
Пример #3
0
        public IEnumerator <Book> GetEnumerator()
        {
            LibraryIterator iter = new LibraryIterator(books);

            return(iter);
        }
Пример #4
0
        public IEnumerator <Book> GetEnumerator()
        {
            var libraryEnumerator = new LibraryIterator(books);

            return(libraryEnumerator);
        }