Should I return an IEnumerable or IList? [closed]
There is a hierarchy here: interface IList<T> : ICollection<T> { } interface ICollection<T> : IEnumerable<T> { } You want to aim for the least possible coupling, so return an IEnumerable<T> if that is enough. It probably will be. Return an IList<T> if the situation requires that the caller gets a List that it can use … Read more