0
Answer

Array.Copy Question

Mark

Mark

17y
1.5k
1
Hi All,

Sorry to ask a C++ question, but can anyone tell me what the following means and perhaps how I could implement in C#?

memcpy( dataBlock.operator->(), compressedData.operator->() + dataIndex, numOfBytesToCopy );

I am trying to use the following in C#:

byte[] compressedData;

int numOfBytesToCopy

byte[] dataBlock = new byte[numOfBytesToCopy];

Array.Copy(compressedData,dataBlock,numOfBytesToCopy);

but I'm unsure how to do the + dataIndex part as dataIndex is an int and compressedData is a byte array.

Thanks in advance for any help
Mark