I want to assign a byte[] to a byte[][] but it gives me the run-time error :
Object reference not set to an instance of an object.
this is my code:
for (int i = 0; i < NumberOfChunks; i++)
{
byte[][] myFile = new byte[NumberOfChunks][];
myFile[i][0] = buffer[i]; // IT STOPS HERE AND GIVES ME THE ERROR
if ((i + 1) == NumberOfChunks)
{
do sth....
}
}