示例#1
0
        protected void BMIButton_Click(object sender, EventArgs e)
        {
            var proxy = new BMICounterClient();

            var bmi = proxy.CalculateBMI(float.Parse(WeightBox.Text), float.Parse(HeightBox.Text));

            ResultLabel.Text += bmi;
        }
示例#2
0
        protected void BMIButton_Click(object sender, EventArgs e)
        {
            var proxy = new BMICounterClient();

            var bmi = proxy.CalculateBMI(float.Parse(WeightBox.Text),float.Parse(HeightBox.Text));

            ResultLabel.Text += bmi;

        }
示例#3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Provide your height in cm:");
            var height = Console.ReadLine();
            Console.WriteLine("Now provide your weight:");
            var weight = Console.ReadLine();

            var proxy = new BMICounterClient();

            var bmi = proxy.CalculateBMI(float.Parse(weight),float.Parse(height));

            Console.WriteLine("Your calculated bmi: " + bmi);

            Console.ReadKey();
        }
示例#4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Provide your height in cm:");
            var height = Console.ReadLine();

            Console.WriteLine("Now provide your weight:");
            var weight = Console.ReadLine();

            var proxy = new BMICounterClient();

            var bmi = proxy.CalculateBMI(float.Parse(weight), float.Parse(height));

            Console.WriteLine("Your calculated bmi: " + bmi);

            Console.ReadKey();
        }