コード例 #1
0
        protected void setFreq_click(object sender, EventArgs e)
        {
            string input = freqsetbox.Text;
            float  hertz = Convert.ToSingle(input);

            engine_manager.setFrequency(hertz);
        }
コード例 #2
0
 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);
     }
 }