Where and Why should I implement an IList? Do anybody need to implement an IList
when actually there are large number of extension methods and utilities that enrich Generic List already??
Could you please guide me, I myself cant imagine a use case that requires implementing an IList
!
Update
For example suppose I need a cash list. In this case I simply Create a CashList
that extends List
class. I dot not have to implement even a single method and can manage cash behavior inside CashList
and also use several methods of List. Why should I implement the IList
instead of inheriting from List
?
public class CashList : List<CashItem>
{
public void UpdateItems();
public void SetExpireTime();
}