-2

I know that IList is the interface and List is the concrete type but I still don't know when to use each one. Is there a better way to decide when to use the interface or the concrete type with some practical scenario.

I want to know why I use IList and why I use List in our project.

Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
  • I have already studied various sites but can't get in deeply. i want to know the practical example for both list..which one will be best to implement in project and performance wise which one is better. – Shivani Sharma May 30 '16 at 06:00
  • @ShivaniSharma There is a practical example further down that thread. – Rob May 30 '16 at 06:28

1 Answers1

0

Your question is quite broad and could probably be solved by a search. Have a look at this post: List<T> or IList<T>. Also refer to theese pages (among others) if you need guidance as to which collection to use:

Community
  • 1
  • 1
Indregaard
  • 1,195
  • 1
  • 18
  • 26