I am trying to cast the day of the week to an integer. I would like Sunday = 0, Monday = 1 ... Saturday = 6
I use:
int TheDayOfWeek = (int) DateTime.Now.DayOfWeek;
I am getting an error stating TheDayOfWeek does not exist in the current context.
How do you do this?
Thank you

Comment