Click or drag to resize
BufferBlockCopy Method
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: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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
ExceptionCondition
ArgumentNullExceptionsrc or dst is null.
ArgumentExceptionsrc 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.
ArgumentOutOfRangeExceptionsrcOffset, dstOffset, or count is less than 0.
See Also