dotConnect for Oracle 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 _
    ) 
    public void CopyTo( 
       DbLoaderColumn[] array,
       int index
    )

    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.Oracle.OracleLoaderColumn 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 OracleLoaderColumnCollection myColumns
      // ...
      OracleLoaderColumn[] myColumnArray = new OracleLoaderColumn[(2*myColumns.Count) - 1];
      myColumns.CopyTo(myColumnArray, 0);
      myColumns.CopyTo(myColumnArray, myColumns.Count);
      myColumns.Clear();
      return true;
    }
    Public Function DoubleYourColumns() As Boolean
      ' ...
      ' create OracleLoaderColumnCollection myColumns
      ' ...
      Dim myColumnArray(2 * myColumns.Count - 1) As OracleLoaderColumn
      myColumns.CopyTo(myColumnArray, 0)
      myColumns.CopyTo(myColumnArray, myColumns.Count)
      myColumns.Clear()
      Return True
    End Function 'DoubleYourColumns
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also