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; }
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; }
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(); }
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(); }