I have something like this
var diff = endDate.Value.Subtract(DateTime.UtcNow); // gives a timespan
var msg = diff.ToString("locked out for another mm minutes and ss seconds");
Was hoping that it would be able to parse out mm
and ss
and replace it with the correct values but I am getting an exception.
Edit
I guess I can do it like this
"Locked out for another {diff.Minutes} minutes and {diff.Seconds} seconds"
but still curious if it can be done all in the toString()