1

Closed

Add int.Seconds and so on

description

Sometimes it's handy to quickly convert number to TimeSpan. Something like should do the trick. It'll allow me to do 10.Seconds()
 
public static TimeSpan Seconds( this int seconds )
{
return TimeSpan.FromSeconds( seconds );
}
Closed Dec 2, 2012 at 1:44 PM by cgessler
Completed in changeset 68628

comments

wrote Mar 26, 2012 at 9:58 PM

Adding described extension (and some similar ones) to various numeric types.

wrote Mar 27, 2012 at 4:35 PM

Completed in changeset 68628.

wrote Dec 2, 2012 at 1:44 PM

wrote Feb 22, 2013 at 12:19 AM

wrote May 16, 2013 at 11:51 AM