Using Array Lists
Unlike Visual Basic .NET, where you can use the ReDim statement to re-dimension an array, arrays are of a fixed size in C#. There are times when you might want to use variable-length arrays in your code, however, as when the user specifies at runtime how many items an array should have, or when you're opening various unknown databases full of records. The ArrayList class lets you add or remove elements to an array at runtime, thus creating dynamic-length arrays. You can see the significant public properties of ArrayList objects in Table 6.5, and the significant public methods of these objects in Table 6.6.
|Capacity||Returns or sets the number of elements ...|