Dofactory.com
Dofactory.com
 Back to list
Views:   8K
Replies:  1
Archived

Why do we use IList instead of List in .NET?

Just curious: why do we use IList instead of List in .NET?

Hari Vyas, Oct 24, 2012
Reply 1
Always try to use the interface where possible to allow the user to have more flexibility on which implementation they use. Generally, IEnumerable and IQueryable are even better thanIList as they're more generic.
Mayur Sirwani, Oct 28, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.