I have a byte array of
byte[] d = new byte[64];
now i want to convert it to a 2d byte array like ..
byte[,] data = new byte[8,8];
can any one help me on this
This could be one of method.
byte[] d = new byte[64];
byte[,] data = new byte[8,8];
int row = 0;
int column = 0;
for(i=0; i < d.Length; i++)
{
row = i%8;
column = i/8;
data [row, column] = d[i];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With