@Inanikian There is no "best"; it depends on context. If you must use methods in IList<T>, say if you require indexing/ordering, then IList<T> may be the best interface type to require. If, on the other hand, you only care to count, add, remove, and enumerate items, but never by index, and don't want to impose a requirement of additional functionality on a class to have an indexer and all the other functionality implied by IList<T> that you wouldn't use anyway, then it may be better to require only what you need, e.g., ICollection<T> (or even IEnumerable<T>, if you aren't modifying anything).
↧