This documentation is archived and is not being maintained.
ListItemCollection.Capacity Property
.NET Framework 1.1
Gets the or sets the maximum number of items that the ListItemCollection can store.
[Visual Basic] Public Property Capacity As Integer [C#] public int Capacity {get; set;} [C++] public: __property int get_Capacity(); public: __property void set_Capacity(int); [JScript] public function get Capacity() : int; public function set Capacity(int);
Property Value
The maximum number of items that the ListItemCollection can store.
Remarks
Use the Capacity property to specify or determine the maximum number of items that the ListItemCollection can store.
Example
[Visual Basic] ' Set the Capacity property for the ListItemCollection equal to ' the upper bound of the data set. NewListItemCollection.Capacity = TempDataTable.Count [C#] /* Set the Capacity property for the ListItemCollection equal to the upper bound of the data set. */ newListItemCollection.Capacity = tempDataTable.Count; [C++] /* Set the Capacity property for the ListItemCollection equal to the upper bound of the data set. */ newListItemCollection->Capacity = tempDataTable->Count;
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
ListItemCollection Class | ListItemCollection Members | System.Web.UI.WebControls Namespace
Show: