Given the following method:
static void ChangeArray(params string[] array) {
for (int i = 0; i < array.Length; i++)
array[i] = array[i] + "s";
}
This works if I call it passing a array of strings:
string[] array = {"Michael", "Jordan"} // will become {"Michaels", "Jordans"}
ChangeArray(array);
But will not work if I call it using string arguments:
string Michael = "Michael";
string Jordan = "Jordan";
ChangeArray(Michael, Jordan); // This will NOT change the values of the variables
I understand that the compiler will wrap Michael and Jordan on an array, so shouldn't the results be the same on both cases?