3 ms·
static void Change(int[] myArray) { myArray = new int[5] {3, 1, 2}; } this will not change the array which was passed in and is a purely local change in C
by aurelwu 8y ago
static void Change(int[] myArray)
{
myArray = new int[5] {3, 1, 2};
}
this will not change the array which was passed in and is a purely local change in C#.
static void Change(ref int[] myArray) on the other side would change the array which was passed in.