To List<T> or to Collection<T>

יום חמישי, מאי 15, 2008

Pop quiz. how can tell me what is the difference between List<T> and Collection<T>? And even more important question "Which is the preferred implementation of a generic list these days?" from a quick look at the classes one can see that Collection<T> is some sort of a customizable wrapper for List<T>... Collection<T> gives more for use as a base class where you can hook the "standard collections" like Insert, Remove, Clear, Set and such. . . This will give you the option to customize these methods according to your needs.  Internally, it's Items property is backed by a...
תגיות: , ,
אין תגובות