[問題] c# numericUpDown 的連動
小弟是初學C#的新手
目前正用Windows Form寫度量衡的介面
但剛剛寫到溫度的轉換時遇到困難
目前我使用2個numericUpDown來做攝氏和華氏的轉換
我目前在華氏這個numericUpDown中寫了
private void FahrenheitUpDown_ValueChanged(object sender, EventaArgs e)
{
double temperature1;
double a = (double)FahrenheiUpDown.Value;
double b = (double)CentigradeUpDown.Value;
temperature1 = b * 9 / 5 + 32;
}
請問我要怎麼寫才能在華氏這個Updown調整數值時
同時攝氏Updown的數值也跟著變動
初學者表達不清楚請見諒
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.163.49.153
※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1476285477.A.669.html
→
10/12 23:52, , 1F
10/12 23:52, 1F
→
10/13 12:03, , 2F
10/13 12:03, 2F
→
10/13 12:04, , 3F
10/13 12:04, 3F