Gets the number of elements that the ArrayList actually contains.
[Visual Basic] Overridable Public ReadOnly Property Count As Integer [C#] public int Count {virtual get;} [C++] public: __property virtual int get_Count(); [JScript] public function get Count() : int;
The number of elements that the ArrayList actually contains.
Count is the number of elements that are actually in the ArrayList. Capacity is the number of elements that the ArrayList is capable of storing.
Count is always less than or equal to Capacity. If Count exceeds Capacity while adding elements, the capacity of the list is doubled by automatically reallocating the internal array.
ArrayList Class | ArrayList Members | System.Collections Namespace | Capacity