예제 #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);
        }