In the next sections, we will see how to add items to a
collection. As you add or insert items
in the list, the Count
property grows. If your collection is array-based, when you start it, you
specify the number of items that the list will contain. In theory, you cannot
add new items beyond that number. In reality, you can increase the size of an
array and then add a new item. If your collection is a linked list, you are also
not confined to the laws of space (unless your computer runs out of memory.

If you create a list whose number of items must be constant,
the user cannot add items beyond the maximum allowed number. Therefore, before
adding an item, you can first check whether the collection has a fixed size or
not. To give you this information, the IList interface is equipped with
a Boolean read-only property named IsFxedSize. This property simply lets
the user know whether the collection has a fixed number of items.

Most collections are meant to receive new items. If you
want, you can create a collection that cannot receive new values. To support
this, the IList interface is equipped with the Boolean IsReadOnly
property. If a collection is read-only, it would prevent the clients from
adding items to it.