public static void Main()
Console.WriteLine($"The value of x before calling the pass by value method is {x}");
Console.WriteLine($"\nThe value of x after calling the pass by value method is still {x}");
UpdateIntegerByRef(ref x);
Console.WriteLine($"The value of x after calling the pass by ref method is now {x}");
string[] names = { "Alysa", "Josh" };
Console.WriteLine($"\nThe names in the array before calling the update names method are: {string.Join(", ", names)}");
Console.WriteLine($"The names in the array after calling the update names method are: {string.Join(", ", names)}");
public static void UpdateInteger(int input)
public static void UpdateIntegerByRef(ref int input)
public static void UpdateNames(string[] names)
for(int i = 0; i < names.Length; i++)
names[i] = names[i].ToUpper();