Newbie needs some help with case statments.
In the code below I want to see if today's day is less than 26. I get an error with my case statment saying I can't implicitly convert a bool to an int. How would I accomplish this?
int dateOfDay = DateTime.Now.Day;
switch(dateOfDay)
{
case dateOfDay < (26):
return DateTime.Today;
break;
case 27:
...
}
In the code below I want to see if today's day is less than 26. I get an error with my case statment saying I can't implicitly convert a bool to an int. How would I accomplish this?
int dateOfDay = DateTime.Now.Day;
switch(dateOfDay)
{
case dateOfDay < (26):
return DateTime.Today;
break;
case 27:
...
}