Click to See Complete Forum and Search --> : Buffer.Blockcopy to multi-dimensional array -


mikey0727
October 17th, 2008, 05:01 PM
I am using VS 2008, C#

if i have 2 byte arrays

packet and PACKET1

I can do a blockcopy from one to the other like so:
Buffer.BlockCopy(packet, 0, PACKET1, 0, packet.Length);

How can I do a blockcopy into one dimension of a multidimensional array, like so:

int i;
public byte[,] PACKETHOLDER;

PACKETHOLDER = new byte[100, 150];

Buffer.BlockCopy(packet, 0, PACKETHOLDER[i], 0, packet.Length);

the above not work. I want to iterate i, and copy a bunch of bytearrays into a multi-dimensional array -

Thank You