[stringtemplate-interest] ST# - question regarding special casing of IList

Kunle Odutola Kunle_Odutola at hotmail.com
Thu May 25 16:12:38 PDT 2006


Jeremy,

> Following on from Kunle's recent post regarding special casing of IList,
> I was wondering if Kunle or someone else could comment on why IList was
> selected for special casing as a multi-valued attribute. The .net design
> guidelines suggest that IList be targeted if the list is to be modified,
> ICollection if they need counts of list members and/or access by index,
> and IEnumerable if none of these are needed.

ICollection doesn't allow access by index iirc.

> Is there a particular
> reason for ST# to target IList and/or to not target IEnumerable?

Virtually all .NET collections (including ILists, IDictionaries etc) are
IEnumerable.


Kunle




More information about the stringtemplate-interest mailing list