Loading ...

Difference between IEnumerable vs IEnumerator ?

Who is online?  0 guests and 1 members
home  »  forums   »  asp.net topics   »  getting started / general asp.net   » Difference between IEnumerable vs IEnumerator ?

Difference between IEnumerable vs IEnumerator ?

Posts under the topic: Difference between IEnumerable vs IEnumerator ?

Posted: 7/26/2010

Starter 1414  points  Starter
  • Joined on: 12/1/2008
  • Posts: 66

Hello Guys,


Can any one tell me what is the basic difference between them? How they are related to collections in .Net?

 

 

Thanks,

Sumit Arora


Posted: 7/26/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172
  Answered

SumitArora said:

Hello Guys,


Can any one tell me what is the basic difference between them? How they are related to collections in .Net?

 

Below links might be helpful for you-

http://www.codeproject.com/KB/cs/sssienumerable.aspx

http://stackoverflow.com/questions/619564/what-is-the-difference-between-ienumerator-and-ienumerable

 

 

 

 


Posted: 7/27/2010

Professional 8505  points  Professional
  • Joined on: 5/3/2010
  • Posts: 391
  Answered

I have just passed tru the pages that Mohit has provided in his post on this thread.

The first page provides detailed info regarding IEnumerable and IEnumerator interfaces

The second page will provide you with short answer but very useful (I've seen this answer previously and I like it!)

I think it's enough to understand the usage of these two interfaces.

 

Edit: Example usage: http://www.codeproject.com/KB/cs/csenumerators.aspx


Page 1 of 1 (3 items)