What is difference between IEnumerable and IList?

There are following differences between ADO.NET and Entity Framework:

IEnumerable IList
Move forward only over a collection, it can’t move backward and between the items. Used to access an element in a specific position/index in a list.
Doesn’t support add or remove items from the list. Useful when you want to Add or remove items from the list.
Find out the no of elements in the collection after iterating the collection. Find out the no of elements in the collection without iterating the collection.
Supports further filtering. Doesn’t support further filtering.

Tagged , . Bookmark the permalink.

Leave a Reply