I'd like to display a TimeSpan value, formatted as mm:ss (minutes, seconds).
The code currently performs this like this:
var timeSpan = GetTimeUntilNextEvent();
var str = DateTime.MinValue.Add(timeSpan).ToString(@"mm\:ss");
I wonder whether that is correct code. I saw other samples that show this technique, but I am not really sure what is the reason for adding something to the MinValue of DateTime.
Why cannot this code be used ? It seems to product a valid result.
var str = DateTime.FromBinary(0).Add(timeSpan).ToString(@"mm\:ss");