Syntax:
void BitArray.CopyTo(Array array, int arrayIndex);
Parameter(s):
- array: An array to copy elements of BitArray.
- index: The index in array at which copying begins.
Return value:
It does not return any value.
Exception(s):
- System.ArgumentNullException
- System.ArgumentOutOfRangeException
- System.ArgumentException
- System.InvalidCastException
-
Program:
The source code to copy the entire BitArray to a compatible one-dimensional Array is given below. The given program is compiled and executed successfully.
Output: