Generic.IList


Generic.List<T> or Generic.IList<T>

List<T>
Is a specific implementation of IList
Is a bloated type that contains a lot of properties and methods you might not need, such as AddRange().
Not designed to be extended, you cannot override any of the members


IList<T>
Is a more loosly coupled interface
Provides the bare minimum contract
Can easily be extended
Should be used by a public facing API
Lets you implement this and inherit from another class at the same time.



© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext