Please Write a C# method named SwapPoints that accepts two Points as parameters and…
Jump to turn (7)
- 1Please Write a C# method named SwapPoints that accepts two Points as parameters
- 2Write a method named SwapPoints that accepts two Points as parameters and swaps
- 3There are compilation problems in Console.Writeline expression in code above.
- 4public class Program { public static void SwapPoints(ref (int x, int y) point1,
- 5Tuples , what is it?
- 6In one tuple I can store more than 2 elements?
- 7Write main class and Add the following method: public string ShowUserNameAndBala
- User
Please Write a C# method named SwapPoints that accepts two Points as parameters and swaps their x/y values.
Consider the following example code that calls swapPoints:
Point p1 = new Point(5, 2); Point p2 = new Point(-3, 6); swapPoints(p1, p2); Console.WriteLine("(" + p1.x + ", " + p1.y + ")"); Console.WriteLine("(" + p2.x + ", " + p2.y + ")"); The output produced from the above code should be:
(-3, 6) (5, 2)
- Assistant