System.Data Namespace DataTable Class
Sets or retrieves the initial starting size for this table.
Script |
DataTable.MinimumCapacity [ = intSize ] |
intSize |
The initial starting size in rows of this table. |
The property is read/write with a default value of 25.
The MinimumCapacity allows the system to create an appropriate set of resources before fetching data. In a situation when performance is critical, setting this property can optimize performance.
The following example sets the MinimumCapacity of a DataTable.
Private void MinimumCapacityDemo ( DataTable myTable ) {
// change the MinimumCapacity.
myTable.MinimumCapacity = 100;
}
Private Sub MinimumCapacityDemo ( ByVal myTable As DataTable )
' change the MinimumCapacity.
myTable.MinimumCapacity = 100
End Sub |
|
C# |
VB |
DataTable Members