Convert byte[] to original 2d array
问题 I've taken a 2D array of UInt16 values, and converted it to raw bytes. I would like to take those bytes and convert them back into the original 2D array, but I'm unsure of how to do this when I only have the bytes, i.e., is there a way to determine the dimensions of an original array when all you have is that array converted to bytes? Here's my code: UInt16[,] dataArray = new UInt16[,] { {4, 6, 2}, {0, 2, 0}, {1, 3, 4} }; long byteCountUInt16Array = dataArray.GetLength(0) * dataArray