Time.ToString("0.0")
显示为十进制“1.5”而不是1:30。我怎样才能让它以时间格式显示?将时间转换为C#中的格式化字符串
private void xTripSeventyMilesRadioButton_CheckedChanged(object sender, EventArgs e)
{
//calculation for the estimated time label
Time = Miles/SeventyMph;
this.xTripEstimateLabel.Visible = true;
this.xTripEstimateLabel.Text = "Driving at this speed the estimated travel time in hours is: " + Time.ToString("0.0") + " hrs";
}
什么类型是时间? 它是浮动的吗? – 2010-04-26 21:14:37