private void btnCalcLength_Click(object sender, EventArgs e) { double length = Convert.ToDouble(txtInput.Text); Meetlat meet = new Meetlat(length); lblM.Text = $"{meet.LengteInM}"; lblCm.Text = $"{meet.LengteInCm}"; lblKm.Text = $"{meet.LengteInKm}"; lblFeet.Text = $"{meet.LengteInVoet}"; }
static void Main(string[] args) { Meetlat meetLat = new Meetlat(2.5); Console.WriteLine($"KiloMeters: {meetLat.LengteInKm:F4}\nMeters: {meetLat.LengteInM:F4}\nCentimeters: {meetLat.LengteInCm:F2}\nVoet: {meetLat.LengteInVoet:F4}"); }