System.Collections.BitArray.CopyTo Method

Copies the entire BitArray to a compatible one-dimensional Array, starting at the specified index of the target array.

Syntax

public void CopyTo (Array array, int index)

Parameters

array
The one-dimensional Array that is the destination of the elements copied from BitArray. The Array must have zero-based indexing.
index
The zero-based index in array at which copying begins.

Remarks

The specified array must be of a compatible type. Only bool, int, and byte types of arrays are supported.

This method uses Array.Copy(Array, Array, int) to copy the elements.

This method is an O(n) operation, where n is BitArray.Count.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0