コード例 #1
0
ファイル: Index.aspx.cs プロジェクト: Melos89/WCFLabs
        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
ファイル: Index.aspx.cs プロジェクト: Melos89/WCFLabs
        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
ファイル: Program.cs プロジェクト: Melos89/WCFLabs
        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();
        }