Hi all, I am developing a program which does quite a lot with days of the week so I am trying to develop a way to loop through days of the week. This is so that no matter who workes on development Monday will always be zero. I have considered Enum and came up with this.
But is there a better way? If this way is correct then how do loop through the days?
Thx T
Age is a consequence of experience
Code:
enum DayNumber : byte
{
MON = 0,
TUE = 1,
WED = 2,
THU = 3,
FRI = 4,
SAT = 5,
SUN = 6
}
private DayNumber aDay
{
get
{
return currentDay;
}
}
private DayNumber currentDay;
But is there a better way? If this way is correct then how do loop through the days?
Thx T
Age is a consequence of experience