Freigeben über


ListItemCollection.Capacity-Eigenschaft

Ruft die maximale Anzahl der Elemente ab, die von der ListItemCollection gespeichert werden können, oder legt diese fest.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public Property Capacity As Integer
'Usage
Dim instance As ListItemCollection
Dim value As Integer

value = instance.Capacity

instance.Capacity = value
public int Capacity { get; set; }
public:
property int Capacity {
    int get ();
    void set (int value);
}
/** @property */
public int get_Capacity ()

/** @property */
public void set_Capacity (int value)
public function get Capacity () : int

public function set Capacity (value : int)

Eigenschaftenwert

Die maximale Anzahl von Elementen, die von der ListItemCollection gespeichert werden können.

Hinweise

Mithilfe der Capacity-Eigenschaft können Sie die maximale Anzahl der Elemente angeben oder bestimmen, die von der ListItemCollection gespeichert werden können.

Beispiel

' Set the Capacity property for the ListItemCollection equal to
'  the upper bound of the data set.
NewListItemCollection.Capacity = TempDataTable.Count
/* Set the Capacity property for the ListItemCollection equal to
   the upper bound of the data set. */
newListItemCollection.Capacity = tempDataTable.Count;
/*    Set the Capacity property for the ListItemCollection equal to
    the upper bound of the data set. */
newListItemCollection.set_Capacity(tempDataTable.get_Count());

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ListItemCollection-Klasse
ListItemCollection-Member
System.Web.UI.WebControls-Namespace