Tag: 单位转换

.NET单位类,英寸到毫米

.NET有单位转换类吗? 我需要将英寸转换为毫米,反之亦然。

华氏温度与摄氏温度之间的转换

我从一开始就有这个问题,这是华氏和摄氏之间的转换。 private void button1_Click(object sender, EventArgs e) { float fahr, cel; if (Celsius.Checked == true) { fahr = float.Parse(textBox1.Text); cel = (5/9)*(fahr-32); richTextBox1.Text = “The Degree in Celsius is:” + cel.ToString() + Environment.NewLine + “cool isn’t it!?”; } else if (Fahrenheit.Checked == true ) { cel = float.Parse(textBox1.Text); fahr = ((9 * cel)/5)+ 32; richTextBox1.Text […]