asp.net.ph

TableRowCollection.CopyTo Method

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
);

Parameters

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.

Remarks

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.

Example

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 );
  C# VB

See Also

TableRowCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph