static void DoPoints() { Point a = new Point(1, 2); var b = new Point(4, 6); Console.WriteLine(a.DistanceFrom(b)); }
private static void Main(string[] args) { Point a = new Point(1, 2); //a.X = 1; //a.Y = 2; Console.WriteLine(value: a.Y); Console.WriteLine(value: a.X); Point result = a + new Point(4, 6); Console.WriteLine(result);//ToString override edilmezse result={DataStructures.Program.Point} double distance = a.DistanceFrom(new Point(4, 6)); Console.WriteLine(distance); Console.WriteLine(); }