Exemple #1
0
        static void Main(string[] args)
        {
            BMICalculatorClient host = new BMICalculatorClient();
            Console.WriteLine("Insert you height (meters): ");
            var height = Console.ReadLine();
            Console.WriteLine("Insert your weight: ");
            var weight = Console.ReadLine();

            Console.WriteLine(host.CalculateBMI(float.Parse(weight), float.Parse(height)));
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            BMICalculatorClient host = new BMICalculatorClient();

            Console.WriteLine("Insert you height (meters): ");
            var height = Console.ReadLine();

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

            Console.WriteLine(host.CalculateBMI(float.Parse(weight), float.Parse(height)));
            Console.ReadLine();
        }
Exemple #3
0
        private void buttonCalc_Click(object sender, EventArgs e)
        {
            BMICalculatorClient host = new BMICalculatorClient();

            labelResult.Text += host.CalculateBMI(float.Parse(textBoxWeight.Text), float.Parse(textBoxHeight.Text));
        }
Exemple #4
0
 private void buttonCalc_Click(object sender, EventArgs e)
 {
     BMICalculatorClient host = new BMICalculatorClient();
     labelResult.Text += host.CalculateBMI(float.Parse(textBoxWeight.Text), float.Parse(textBoxHeight.Text));
 }