Maybe this is not directly answering your question, but in .NET 4.5+, I prefer to follow these rules when designing public or protected APIs:
- do return
IEnumerable<T>
, if only enumeration is available; - do return
IReadOnlyCollection<T>
if both enumeration and items count are available; - do return
IReadOnlyList<T>
, if enumeration, items count and indexed access are available; - do return
ICollection<T>
if enumeration, items count and modification are available; - do return
IList<T>
, if enumeration, items count, indexed access and modification are available.
Last two options assume, that method must not return array as IList<T>
implementation.