I have this simple program:
DateTime aux = new DateTime(2012, 6, 12, 12, 24, 0);
DateTime aux2 = new DateTime(2012, 6, 12, 13, 24, 0);
aux2.AddDays(1);
Console.WriteLine((aux2 - aux).TotalHours.ToString());
Console.ReadLine();
I debugged this and found aux2.AddDays(1);
doesn't seem to work, what am I missing here?
it should return 25 but the answer is one.
What is the problem?
also AddHours
doesn't work, I guess that the others aren't working too.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…