What is the recommended way of formatting TimeSpan objects into a string with a custom format?
TimeSpan
if (timeSpan.TotalDays < 1) return timeSpan.ToString(@"hh\:mm\:ss"); return timeSpan.TotalDays < 2 ? timeSpan.ToString(@"d\ \d\a\y\ hh\:mm\:ss") : timeSpan.ToString(@"d\ \d\a\y\s\ hh\:mm\:ss");
All literal characters must be escaped.