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 12:44 PM by cgessler
Completed in changeset 68628

comments

wrote Mar 26, 2012 at 8:58 PM

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

wrote Mar 27, 2012 at 3:35 PM

Completed in changeset 68628.

wrote Dec 2, 2012 at 12:44 PM

wrote Feb 21, 2013 at 11:19 PM

wrote May 16, 2013 at 10:51 AM