Understanding Collections Architecture

Collections are special classes that can store sets of objects; the .NET Framework offers both nongeneric and generic collections. Whatever kind of collection you work on, collections implement some interfaces. The first one is ICollection that derives from IEnumerable and provides both the enumerator (which enables For..Each iterations) and special members, such as Count (which returns the number of items within a collection) and CopyTo (which copies a collection to an array). Collections also implement IList or IDictionary; both inherit from ICollection and expose members that enable adding, editing, and removing items from a collection. The difference is that IDictionary works with key/value pairs instead ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.