I\'m looking for a solution in .net 3.5 I wrote the following working solution:
private string FormatTimeSpan(TimeSpan time) { return String.Format(\"{0}{1:0
Somewhat shorter, using Custom TimeSpan Format Strings:
private string FormatTimeSpan(TimeSpan time) { return ((time < TimeSpan.Zero) ? "-" : "") + time.ToString(@"mm\:ss"); }
for below .Net 4.0
You can use:
get { return Time.ToString().Substring(3); }