Can you round a .NET TimeSpan object?
问题 Can you round a .NET TimeSpan object? I have a Timespan value of: 00:00:00.6193789 Is there a simple way to keep it a TimeSpan object but round it to something like 00:00:00.62? 回答1: Sorry, guys, but both the question and the popular answer so far are wrong :-) The question is wrong because Tyndall asks for a way to round but shows an example of truncation . Will Dean's answer is wrong because it also addresses truncation rather than rounding . (I suppose one could argue the answer is right