If a one-dimensional array contains primitive data in the main row order , and the total capacity of a 2-dimensional array is equal to the length of a one-dimensional array, you can use this.
int[] source = new int[6]; int[,] target = new int[3, 2]; Buffer.BlockCopy(source, 0, target, 0, source.Length * sizeof(int));
Note that unlike Array.Copy and other array / list Buffer.BlockCopy works with several bytes of data, even if each element of the array is more than 1 byte. It also only works with arrays of primitive data types.
Additional links:
Edit: Here is the full unit test.
[TestMethod] public void SOTest16203210() { int[] source = new int[6] { 1, 2, 3, 4, 5, 6 }; int[,] destination = new int[3, 2]; Buffer.BlockCopy(source, 0, destination, 0, source.Length * sizeof(int)); Assert.AreEqual(destination[0, 0], 1); Assert.AreEqual(destination[0, 1], 2); Assert.AreEqual(destination[1, 0], 3); Assert.AreEqual(destination[1, 1], 4); Assert.AreEqual(destination[2, 0], 5); Assert.AreEqual(destination[2, 1], 6); }