Method Copy
Copy(int, int, int)
Copies a range of bits from this array to another range in this array.
Declaration
public void Copy(int dstPos, int srcPos, int numBits)
Parameters
Type | Name | Description |
---|---|---|
int | dstPos | Index of the first bit to set. |
int | srcPos | Index of the first bit to copy. |
int | numBits | Number of bits to copy. |
Remarks
The bits to copy run from index srcPos
up to (but not including) srcPos + numBits
.
The bits to set run from index dstPos
up to (but not including) dstPos + numBits
.
The ranges may overlap, but the result in the overlapping region is undefined.
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if either |
Copy(int, ref NativeBitArray, int, int)
Copies a range of bits from an array to a range of bits in this array.
Declaration
public void Copy(int dstPos, ref NativeBitArray srcBitArray, int srcPos, int numBits)
Parameters
Type | Name | Description |
---|---|---|
int | dstPos | Index of the first bit to set. |
Native |
srcBitArray | The source array. |
int | srcPos | Index of the first bit to copy. |
int | numBits | The number of bits to copy. |
Remarks
The bits to copy in the source array run from index srcPos up to (but not including) srcPos + numBits
.
The bits to set in the destination array run from index dstPos up to (but not including) dstPos + numBits
.
When the source and destination are the same array, the ranges may still overlap, but the result in the overlapping region is undefined.
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if either |