TimeSpan -Negative() ?

  • Thread starter Thread starter Guest
  • Start date Start date
You can check any of the total values:
TotalDays, TotalHours, TotalMinutes, TotalSeconds, TotalMilliseconds.
If the time is only a few milliseconds different then all of these values
will be zero, except TotalMilliseconds, which will be negative.

Rick D.
Contractor
 
Thank you,
But i don't see how can i use .Negative function?
or How can check .TotalHours is negative?
 
You can use

if(mytimespan.CompareTo(TimeSpan.Zero) < 0)
{
//your timespan is negative
}

Peter
 
Back
Top