Hunny Software Library Reference

ByteString.CopyTo Method 

Copies bytes from this instance to an array of bytes.

[Visual Basic]
Public Sub CopyTo( _
   ByVal srcIndex As Integer, _
   ByVal dst As Byte(), _
   ByVal dstIndex As Integer, _
   ByVal count As Integer _
)
[C#]
public void CopyTo(
   int srcIndex,
   byte[] dst,
   int dstIndex,
   int count
);

Parameters

srcIndex
position of first byte to copy
dst
array of bytes, which is the destination
dstIndex
position of the first copied byte in dst
count
number of bytes to copy

Remarks

The method copies count bytes from the position srcIndex to the array dst at position dstIndex.

Exceptions

Exception TypeCondition
ArgumentNullExceptiondst is null
ArgumentOutOfRangeExceptionsrcIndex < 0,
or dstIndex < 0,
or count < 0
or srcIndex + count > Length
or dstIndex + count > dst.Length

See Also

ByteString Class | Hunny.Base Namespace