A
Aaron
I would like to move the values of an array up one in the index.
This is what i tried but it didn't work.
int[] intArr = new int[5];
Array.Copy(intArr, 0, intArr 1, 4);
intArr[0] = userinput;
//this is how it should work
userinput: 5
intArr {5,null,null,null,null}
userinput: 4
intArr {4,5,null,null,null}
userinput: 9090
intArr {9090,4,5,null,null}
////
Thanks in advance
This is what i tried but it didn't work.
int[] intArr = new int[5];
Array.Copy(intArr, 0, intArr 1, 4);
intArr[0] = userinput;
//this is how it should work
userinput: 5
intArr {5,null,null,null,null}
userinput: 4
intArr {4,5,null,null,null}
userinput: 9090
intArr {9090,4,5,null,null}
////
Thanks in advance