CopyTo Method (DbLoaderColumnCollection)
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
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