IList is an interface. It provides a template, i.e. a common set of
properties and methods that every kind of list should implement. Any class
implementing IList must provide definitions for the members of this
interface. This guarantees that all classes that implement this interface
offer a basic set of common functionality. If you take a look at the
interface definition you will notice that IList implements two other
interfaces itself, namely ICollection and IEnumerable. This makes sense as a
list is basically an enumerable collection.
A collection is a term for a particular *kind* of class. The characteristics
that a collection should exhibit are defined in ICollection, and any data
structure implementing this interface is a collection. Simply think of a
collection as just that: a collection of objects (or simple data types, of
course).
An array *is* a collection. It shares some common features with all other
collections. However, it can be distinguished from other collections by its
specific functionality (e.g. it has a fixed size, it contains data of only
one type, etc.)
I hope this makes sense.
--
Kai Brinkmann [MSFT]
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:eg**************@TK2MSFTNGP15.phx.gbl...
Hi,
When I studied CSharp, I am confuse by IList, Collection and Array.
What is the relationships between them?