예제 #1
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (int.TryParse(ent.Text, out int val))
     {
         var mile  = UnitConverters.MilesToMeters(val);
         var mile2 = UnitConverters.MilesToKilometers(val);
         var unit  = UnitConverters.PoundsToKilograms(val);
         lab.Text  = $"Meters:{mile}, Kilometeres:{mile2}";
         lab2.Text = $"Kilograms:{unit}";
     }
 }