ENet Class Library for C#

Packet.CopyTo(Byte, Int32, Int32) Method

Copies part of the packet data into an array.

[Visual Basic]
Public Overloads Sub CopyTo( _
   ByVal array As Byte, _
   ByVal arrayIndex As Integer, _
   ByVal count As Integer _
)
[C#]
public void CopyTo(
   byte[] array,
   int arrayIndex,
   int count
);

Parameters

array
The array to copy into.
arrayIndex
The target array index at which to begin copying.
count
The number of bytes to copy.

Exceptions

Exception Type Condition
ArgumentNullException array is null.
ArgumentOutOfRangeException arrayIndex and/or count are out of range.
InvalidOperationException The packet is not initialized.

See Also

Packet Class | ENet Namespace | Packet.CopyTo Overload List