Time.ToString("0.0")
में एक स्वरूपित स्ट्रिंग में एक समय कनवर्ट करें 1:30 के बजाय दशमलव "1.5" के रूप में दिखाया गया है। मैं इसे समय प्रारूप में प्रदर्शित करने के लिए कैसे प्राप्त कर सकता हूं?सी #
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";
}
समय किस प्रकार का है? क्या यह फ्लोट है? –