Hi, I am trying to construct a DateTime in C# one step at a time, as in, the whole date not being in the constructor. I'm not understanding what is wrong though.
DateTime d = new DateTime((long)0);
d.AddYears(2000);
with that d.Years
will still be equal to 1 though. Also, I must store the date as a long. So I can't just build the date with a huge constructor and I also can't have a persisting DateTime instance, so I dump it to a long and then restore it and I start with a value of 0
. Am I suppose to start with a different value than zero?
what exactly is wrong?