In .Net, is there a way to convert, say, '2:45'
to the decimal 2.75?
ex:
decimal d = TimeToDecimal("2:45");
Console.WriteLine(d);
//output is 2.75
It should throw an exception if invalid data, ex, minutes < 0 < 60 or not in the h:m format.
Thanks