private void Button_Click17(object sender, RoutedEventArgs e) { string inputValue = inputTextBox17.Text; double value = double.Parse(inputValue); // TryParse! double result = new WeightConverter().Convert("f", "kg", value); outputTextBlock17.Text = result.ToString(); }