dotConnect for SQLite Documentation
Devart.Common Namespace / DbLoaderColumnCollection Class / CopyTo Method
The array into which to copy the DbLoaderColumn objects.
The zero-based index of the array.
Example

In This Topic
CopyTo Method (DbLoaderColumnCollection)
In This Topic
Copies DbLoaderColumn objects from the DbLoaderColumnCollection to the specified array.
Syntax
'Declaration
 
Public Sub CopyTo( _
   ByVal array() As DbLoaderColumn, _
   ByVal index As Integer _
) 
 

Parameters

array
The array into which to copy the DbLoaderColumn objects.
index
The zero-based index of the array.
Example
The following example exports the DbLoaderColumnCollection to an array of Devart.Data.SQLite.SQLiteLoaderColumn objects, doubles the size of the array by using CopyTo and returns the collection. It then clears the collection, and returns true if the columns are no longer persisting. This example assumes that a DbLoaderColumnCollection has already been created.
public bool DoubleYourColumns() {
  // ...
  // create SQLiteLoaderColumnCollection myColumns
  // ...
  SQLiteLoaderColumn[] myColumnArray = new SQLiteLoaderColumn[(2*myColumns.Count) - 1];
  myColumns.CopyTo(myColumnArray, 0);
  myColumns.CopyTo(myColumnArray, myColumns.Count);
  myColumns.Clear();
  return true;
}
Public Function DoubleYourColumns() As Boolean
  ' ...
  ' create SQLiteLoaderColumnCollection myColumns
  ' ...
  Dim myColumnArray(2 * myColumns.Count - 1) As SQLiteLoaderColumn
  myColumns.CopyTo(myColumnArray, 0)
  myColumns.CopyTo(myColumnArray, myColumns.Count)
  myColumns.Clear()
  Return True
End Function 'DoubleYourColumns
See Also