derive from IEnumerator<T>

This is a discussion on derive from IEnumerator<T> within the C# Programming forums, part of the General Programming Boards category; Hello everyone, I am wondering why do we need to derive some type from IEnumerator<T>? Could anyone show me some ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    derive from IEnumerator<T>

    Hello everyone,


    I am wondering why do we need to derive some type from IEnumerator<T>? Could anyone show me some useful samples?

    I think using IEnumerator<T> itself should be enough in all cases?


    thanks in advance,
    George

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    This page has an illustration of when you can create a custom iterator
    http://msdn.microsoft.com/en-us/libr...numerator.aspx

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks indigo0086,


    My question is about how to write the generics form IEnumeraot<T>, especially how to write the constructor and dealing with T. Your referred link is about the non-generics form of IEnumerator.

    Any more ideas or references? :-)

    Quote Originally Posted by indigo0086 View Post
    This page has an illustration of when you can create a custom iterator
    http://msdn.microsoft.com/en-us/libr...numerator.aspx

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to derive from class with templates
    By mikel123 in forum C++ Programming
    Replies: 2
    Last Post: 01-14-2008, 11:19 AM
  2. How To Derive from a singleton
    By appleGuy in forum C++ Programming
    Replies: 8
    Last Post: 03-24-2007, 01:55 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21