static void Main(string[] args) { Console.WriteLine("Hello World!"); int PlayerPositionX = 5; int PlayerPositionY = 5; Add(PlayerPositionY, PlayerPositionX); Console.WriteLine(PlayerPositionX + " " + PlayerPositionY); //it should be both 10 10 but instead only printing 5 5 } public static int Add(int X, int Y) { X = X + X; Y = Y + Y; return X; return Y; }