Hi.

This is a bit of an issue I found.

My application has an object which has a property/field of a dateTime value.

On every tick, the current time is compared with the objects' datetime value and if it succeeds, it does a particular operation.

Now, thats fine when comparing TIME but when I want to compare the current Date/Time (DateTime.Now) - the condition never evaluates to true with the objects' datetime property

I can compare time, by specifiying each of the "time" values (Hour, Minute, Second) but I would like to be more efficient, and well generally better, and use the DateTime.Now to compare all factors, or at least the current date.

I have tried the DateTime.Equals() and the == operator but both seem to evaluate to false when that time approaches.


There is no code to show at all apart from comparing 2 objects:

Code:
if (DateTime.Now == ((SomeClass)this.TheCollection.TheStartTime)) {..}