Copies a specified number of bytes from a source array starting at a particular offset to a destination array starting at a particular offset.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static void BlockCopy(
Array src,
int srcOffset,
Array dst,
int dstOffset,
int count
)
Parameters
- src
- Type: SystemArray
The source buffer. - srcOffset
- Type: SystemInt32
The zero-based byte offset into src. - dst
- Type: SystemArray
The destination buffer. - dstOffset
- Type: SystemInt32
The zero-based byte offset into dst. - count
- Type: SystemInt32
The number of bytes to copy.
Exceptions Exception | Condition |
---|
ArgumentNullException | src or dst is null. |
ArgumentException | src or dst is not an array of primitives.-or- The number of bytes in src is less than srcOffset plus count.-or- The number of bytes in dst is less than dstOffset plus count. |
ArgumentOutOfRangeException | srcOffset, dstOffset, or count is less than 0. |
See Also