How can I quickly shift all the items in an array one to the left, padding the end with null?
For example, [0,1,2,3,4,5,6] would become [1,2,3,4,5,6,null]
Ed
Use the Array.Copy() method as in
Array.Copy()
int?[] myArray = new int?[]{0,1,2,3,4}; Array.Copy(myArray, 1, myArray, 0, myArray.Length - 1); myArray[myArray.Length - 1] = null
The Array.Copy is probably the way, Microsoft wanted us to copy array elements...
Array.Copy