Пример #1
0
        public static void Main()
        {
            var calc = new DistanceCalculatorClient();
            var result = calc.CalculateDistance(
                new Point() { X = 5, Y = 10 }, 
                new Point() { X = 10, Y = 15 });

            Console.WriteLine(result);
        }
 static void Main(string[] args)
 {
     Point a = new Point(){X = 3, Y = 5};
     Point b = new Point(){X = 10,Y = 2};
     DistanceCalculatorClient c = new DistanceCalculatorClient();
     
     var result = c.CalculateDistance(a, b);
     Console.WriteLine(result);
 }
        static void Main(string[] args)
        {
            Point a = new Point()
            {
                X = 3, Y = 5
            };
            Point b = new Point()
            {
                X = 10, Y = 2
            };
            DistanceCalculatorClient c = new DistanceCalculatorClient();

            var result = c.CalculateDistance(a, b);

            Console.WriteLine(result);
        }
Пример #4
0
        public static void Main()
        {
            int startX = int.Parse(Console.ReadLine());
            int startY = int.Parse(Console.ReadLine());

            int endX = int.Parse(Console.ReadLine());
            int endY = int.Parse(Console.ReadLine());

            DistanceCalculatorClient  distanceCalculator = new DistanceCalculatorClient();

            var startPoint = new Point() { X = startX, Y = startY };
            var endPoint = new Point() { X = endX, Y = endY };
            var distance = distanceCalculator.CalculateDistance(startPoint, endPoint);

               Console.WriteLine(distance);
        }
        static void Main()
        {
            DistanceCalculatorClient calculator = new DistanceCalculatorClient();

            Point startPoint = new Point()
            {
                X = 5,
                Y = 4
            };

            Point endPoint = new Point()
            {
                X = 10,
                Y = 30
            };

            double result = calculator.CalculateDistance(startPoint, endPoint);

            Console.WriteLine(result);
        }
Пример #6
0
        public static void Main()
        {
            int startX = int.Parse(Console.ReadLine());
            int startY = int.Parse(Console.ReadLine());

            int endX = int.Parse(Console.ReadLine());
            int endY = int.Parse(Console.ReadLine());

            DistanceCalculatorClient distanceCalculator = new DistanceCalculatorClient();

            var startPoint = new Point()
            {
                X = startX, Y = startY
            };
            var endPoint = new Point()
            {
                X = endX, Y = endY
            };
            var distance = distanceCalculator.CalculateDistance(startPoint, endPoint);

            Console.WriteLine(distance);
        }