DataRowCollection.CopyTo Method

Definition

Copies all the DataRow objects from the collection into the given array, starting at the given destination array index.

Overloads

CopyTo(Array, Int32)

Copies all the DataRow objects from the collection into the given array, starting at the given destination array index.

CopyTo(DataRow[], Int32)

Copies all the DataRow objects from the collection into the given array, starting at the given destination array index.

CopyTo(Array, Int32)

Source:
DataRowCollection.cs
Source:
DataRowCollection.cs
Source:
DataRowCollection.cs

Copies all the DataRow objects from the collection into the given array, starting at the given destination array index.

C#
public override void CopyTo(Array ar, int index);

Parameters

ar
Array

The one-dimensional array that is the destination of the elements copied from the DataRowCollection. The array must have zero-based indexing.

index
Int32

The zero-based index in the array at which copying begins.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

CopyTo(DataRow[], Int32)

Source:
DataRowCollection.cs
Source:
DataRowCollection.cs
Source:
DataRowCollection.cs

Copies all the DataRow objects from the collection into the given array, starting at the given destination array index.

C#
public void CopyTo(System.Data.DataRow[] array, int index);

Parameters

array
DataRow[]

The one-dimensional array that is the destination of the elements copied from the DataRowCollection. The array must have zero-based indexing.

index
Int32

The zero-based index in the array at which copying begins.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1