Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2022
What would you like to do?
DateTime.Now.DayOfWeek switch
not (DayOfWeek.Saturday or DayOfWeek.Sunday) => "Not Weekend",
DayOfWeek.Saturday or DayOfWeek.Sunday => "Weekend",
_ => throw new ArgumentOutOfRangeException()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment