protected void setFreq_click(object sender, EventArgs e) { string input = freqsetbox.Text; float hertz = Convert.ToSingle(input); engine_manager.setFrequency(hertz); }
protected void setFreq_click(object sender, EventArgs e) { try { string input = freqsetbox.Text; float hertz = Convert.ToSingle(input); engine_manager.setFrequency(hertz); } catch (FormatException ex) { writeLine(ex.Message); } }