Parse time string to decimal?
<p>In .Net, is there a way to convert, say, <code>'2:45'</code> to the decimal 2.75?</p>

<p>ex:</p>

<pre><code>decimal d = TimeToDecimal("2:45");
Console.WriteLine(d);

//output is 2.75
</code></pre>

<p>It should throw an exception if invalid data, ex, minutes &lt; 0 &lt; 60 or not in the h:m format.</p>

<p>Thanks</p>
