public static void Main()
        {
            DistanceServiceClient calculator = new DistanceServiceClient();
            Point startPoint = new Point() { x = 10, y = 10};
            Point endPoint = new Point() { x = 15, y = 15};
            var distance = calculator.CalculateDistance(startPoint, endPoint);

            Console.WriteLine(distance);

        }
Exemplo n.º 2
0
        public static void Main()
        {
            DistanceServiceClient calculator = new DistanceServiceClient();
            Point startPoint = new Point()
            {
                x = 10, y = 10
            };
            Point endPoint = new Point()
            {
                x = 15, y = 15
            };
            var distance = calculator.CalculateDistance(startPoint, endPoint);

            Console.WriteLine(distance);
        }
Exemplo n.º 3
0
        static void Main()
        {
            Console.WriteLine("Please enter X and Y for start point separated by space:");
            string[] input = Console.ReadLine().Split(' ');
            Point    start = new Point()
            {
                X = int.Parse(input[0]), Y = int.Parse(input[1])
            };

            Console.WriteLine("Please enter X and Y for end point separated by space:");
            input = Console.ReadLine().Split(' ');
            Point end = new Point()
            {
                X = int.Parse(input[0]), Y = int.Parse(input[1])
            };

            DistanceServiceClient client = new DistanceServiceClient();
            double distance = client.CalculateDistance(start, end);

            Console.WriteLine(distance);
        }