Re: Why isn"t there multiply operator for TimeSpan?
am 01.02.2008 05:40:07 von NoSpamMgbworld
Most likely because a TimeSpan is a DateTime object. Although it can be
expressed as a straight number, it is not internally represented that way.
It could also be that your need was not envisioned.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
|
*************************************************
"Israel" wrote in message
news:0d81642b-2e90-4dff-a4f7-b3c0872887b3@f47g2000hsd.google groups.com...
> I've run across many situations where I want to store the time delta
> as a TimeSpan (e.g. sampling interval) and then I want to skip every
> 3rd sample so I want to multiple the delta by the int 3 but I'm forced
> to multiple the ticks by 3 and then construct a new TimeSpan with the
> resultant ticks.
>
Re: Why isn"t there multiply operator for TimeSpan?
am 01.02.2008 08:06:59 von skeet
Cowboy (Gregory A. Beamer) wrote:
> Most likely because a TimeSpan is a DateTime object. Although it can be
> expressed as a straight number, it is not internally represented that way.
> It could also be that your need was not envisioned.
No, a TimeSpan isn't a DateTime object, and internally it *is*
represented as a number - an Int64.
--
Jon Skeet -
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk