Monday, June 26, 2017

ICollection, IEnumerable, IDictionary, IList are interfaces for collections in C#.

You may have an IList type getsetter and assign a list or an array to it and the same may be said of IEnumerable. Clearly IList and IEnumerable behave differently in the same way List and IEnumerable behave differently with IEnumerable exposing fewing convenience methods for functionality in exchange for a lighter footprint. ICollection in contrast may also have a HashSet assigned to it!

No comments:

Post a Comment