System.Web.UI.WebControls Namespace TableRowCollection Class
Copies the rows from a Table to an array.
[ VB ]
NotOverridable Public Sub CopyTo ( _
ByVal array As Array, _
ByVal index As Integer _
)
[ C# ]
public void CopyTo (
Array array,
int index
);
[ C++ ]
public: __sealed void CopyTo (
Array* array,
int index
);
[ JScript ]
public function CopyTo (
array : Array,
index : int
);
- array
- A zero-based Array that receives the rows copied from a TableRowCollection.
- index
- The index location in the specified array to receive the rows.
Use the CopyToArray method to copy the contents of a Table.Rows collection into the specified Array object, starting at the specified index in the array.
NOTE: The array parameter must be a zero-based System.Array object.
The following example demonstrates how to use the CopyTo method to copy the rows from the TableRowCollection into a specified array.
TableRow [ ] myArray = new TableRow [ ];
// copy the collection to an array.
myTable.Rows.CopyTo ( myArray, 0 );
Dim myArray ( 6 ) As TableRow
' copy the collection to an array.
myTable.Rows.CopyTo ( myArray, 0 ) |
|
C# |
VB |
TableRowCollection Members