Which is the best type to us for returning collections?
Should I use IList<T>
, IEnumerable<T>
, IQueryable<T>
, something else? Which is best and why?
I'm trying to decide which I should use typically, both in the interface and the implementation of a few classes that I'm writing.
edit Let me nail this down a little further, I am using LINQ to SQL to return data over a WCF Service. It feels like that may make a change in the best type to use?