Skip to content
Discussion options

You must be logged in to vote

With #1047 I could image you'd be able to do something like that

static bool Flag(this Direction self, Direction d) => self.HasFlags(d); // hypothetical "pattern extensions"

direction switch
{
 Flag(Direction.Up) => ...,
 Flag(Direction.Down) => ...,
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@oriko1010
Comment options

Answer selected by oriko1010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants