public IEnumerator <Book> GetEnumerator() { this.Sort(); IEnumerator <Book> bookEnumerator = new LibraryIterator(this.books); return(bookEnumerator); }
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]; //} }
public IEnumerator <Book> GetEnumerator() { LibraryIterator iter = new LibraryIterator(books); return(iter); }
public IEnumerator <Book> GetEnumerator() { var libraryEnumerator = new LibraryIterator(books); return(libraryEnumerator); }