Back to list
Views:   0
Replies:  0
Archived
,
Reply 1
IList is an interface.  List is one concrete type that implements the IList interface. Other objects that implement IList are bound to share the same behaviour. If you plan to expose the interface to other callers that you currently know nothing about, or even vaguely consider that changing the list type to another is possible, say to a custom List type that implements IList, implement the interface instead of a concrete type. Check this article to know more details.

Difference between IList and List inC#

BASIC DIFFERENCE BETWEEN ARRAYLIST AND LIST
Jonas Jonasstuart, Sep 29, 2016
Reply 2
To understand the difference between List and IList you need to understand the difference between classes and interfaces.
It's the basic of OO development. You should first learn this before you continue on Design Patterns.
Wesley Walraeve, Aug 08, 2012
Reply 3
Program to interface not to class.
IList is an interface and List is concrete class. 
Let's suppose you have a business object where you want to use a object of type Apple. May be it is fine for now but later you may need to support Mango type object. In that case you may probably need to change the business layer. 
To get rid of these tight coupling you need to use interface like IFruit. Then your business layer will not depend just on Apple class and you will get rid of tight coupling. 
Pradip Shrestha, Jun 14, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas