コード例 #1
0
 /// <summary>
 /// Formatted localized speed string, used to display speed limits, with 0 decimal precision
 /// </summary>
 public static string FormatSpeedLimit(float speed, bool isMetric)
 {
     return(String.Format(CultureInfo.CurrentCulture,
                          "{0:F0} {1}", MpS.FromMpS(speed, isMetric), isMetric ? kmph : mph));
 }
コード例 #2
0
 /// <summary>
 /// Formatted localized speed string, used to display speed limits, with 0 decimal precision and no unit of measure
 /// </summary>
 public static string FormatSpeedLimitNoUoM(float speed, bool isMetric)
 {
     return(String.Format(CultureInfo.CurrentCulture,
                          "{0:F0}", MpS.FromMpS(speed, isMetric)));
 }