I have a function which returns a variable number of elements, should I return an array or a List? The \"collection\'s\" size does not change once returned, ie for all purpo
One opinion I see pretty often a suggestion to return either IList or ReadOnlyCollection. It's OK to return these if you have one of these available - both can be assigned directly to an IEnumerable (they work directly with any LINQ methods). One thing to note is ReadOnlyCollection is a very lightweight type that can wrap any IList.