I've probably been working too hard, but can someone explain to me the following, taken from the Immediate
window?
(int)DateTime.Now.Date.DayOfWeek
= 4
and
(int)DayOfWeek.Sunday
= 0
and
(int)DateTime.Now.Date.DayOfWeek - (int)DayOfWeek.Sunday
= 4
but
(int)DayOfWeek.Sunday - (int)DateTime.Now.Date.DayOfWeek
= Could not evaluate expression`
Thanks for reading.
EDIT:
Its the Immediate window that's giving me this weird result, not regular code.
Screenshot: http://ploader.net/files/0c2556df475b3075634d7fd2b0575794.PNG
EDIT2:
The community seem to think its a bug in VS2010. I wonder if @EricLippert or @JonSkeet could spare a minute to confirm this or, if its not, offer an explanation about this behaviour?