Example #1
0
 // Process BMI button
 private void btn_process_Click(object sender, EventArgs e)
 {
     if (centimeters > 0 && kilograms > 0)
     {
         try
         {
             BMI    thisGuy   = new BMI();
             string outString = thisGuy.BMIString(kilograms, centimeters);
             MessageBox.Show(outString);
         }
         catch
         {
         }
     }
     else
     {
         MessageBox.Show("Please enter data");
     }
 }