Mono Class Library: System.Buffer Overview | Members

System.Buffer.BlockCopy Method

Copy a block of data on the byte level between two arrays.

public static void BlockCopy (Array src, int srcOffset, Array dst, int dstOffset, int count)

Parameters

src
The source Array the byte data is copied from.
srcOffset
The non-negative integer index from where the copying starts in the source array.
dst
The non-negative destination Array the byte block is copied into. It has to be sufficiently long.
dstOffset
The non-negative destination index into the destination array. It has to be within the array's length.
count
The number of bytes to copy.

Remarks

Copy count bytes starting from the srcOffset position in the src array to the dstOffset position in the dst array. The source and destination arrays do not have to share the same type, but they are both treated as linear byte array. The indexes to the copy operation are at byte level and do not have to be aligned on the primitive type's boundaries.

Requirements

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