code_junkie

Why does IEnumerable<T> inherit from IEnumerable?

Nov 11th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. private IEnumerator<string> Enumerator() {
  2. // ...
  3. }
  4.  
  5. public IEnumerator<string> GetEnumerator() {
  6. return Enumerator();
  7. }
  8.  
  9. System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
  10. return Enumerator();
  11. }
Add Comment
Please, Sign In to add comment