point-cpp-cs-exercise/cs/Prog-no-comments.cs - A C# client class of class Point. | Lecture 2 - slide 29 : 29 Program 2 |
using System; public class PointClient{ public static void Main(){ PointClient pc = new PointClient(); pc.Go(); } public void Go(){ Point p1 = new Point(1, 2), p2 = new Point(3, 4), p3 = p1, p4 = p2, p5; p5 = PointMover(p1, p2); Console.WriteLine("{0} {1} {2} {3} {4}", p1, p2, p3, p4, p5 ); } public Point PointMover(Point pa, Point pb){ pa.Move(5,6); pb.Move(-5,-6); return pb; } }