On my application i assign a DateTime.Now to a new DateTime. then i assign it to a value and write it to the database. But then when i get it back from the database and compare the variable to the new datetime assigned earlier it differs with a couple of milliseconds.
Anyone has an idea why this happens?
E.g.
DateTime var1 = DateTime.Now;
Object1.DateTime = var1;
Database.SaveObject = var1
Object2 = Database.FindObjectById(objectId);
Assert.AreEqual(var1, Object2.DateTime);