Skip to content

Instantly share code, notes, and snippets.

Created June 16, 2022 13:00
What would you like to do?
switch (DateTime.Now.DayOfWeek)
case DayOfWeek.Monday:
case DayOfWeek.Tuesday:
case DayOfWeek.Wednesday:
case DayOfWeek.Thursday:
case DayOfWeek.Friday:
return "Not Weekend";
case DayOfWeek.Saturday:
case DayOfWeek.Sunday:
return "Weekend";
throw new ArgumentOutOfRangeException();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment