Hello,
When I want to display a TimeSpan using the .ToString() method, I get that exception :
Exception System.Exception - CLR_E_UNSUPPORTED_INSTRUCTION (1)
How to reproduce :
var duration = DateTime.UtcNow.Subtract(deb);
var str = duration.ToString(); // Exception thrown here
Debug.WriteLine("Duration : " + str);
However, if I use the following syntax, I don’t get any exception :
var duration = DateTime.UtcNow.Subtract(deb);
Debug.WriteLine("Duration : " + duration);
Does anyone have a solution to get a string that represents a TimeSpan ?
Regards,
Christophe