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(); }
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(); }
private void buttonCalc_Click(object sender, EventArgs e) { BMICalculatorClient host = new BMICalculatorClient(); labelResult.Text += host.CalculateBMI(float.Parse(textBoxWeight.Text), float.Parse(textBoxHeight.Text)); }
private void buttonCalc_Click(object sender, EventArgs e) { BMICalculatorClient host = new BMICalculatorClient(); labelResult.Text += host.CalculateBMI(float.Parse(textBoxWeight.Text), float.Parse(textBoxHeight.Text)); }