Skip to content
Discussion options

You must be logged in to vote

You can use disjunctive patterns (or):

if (value is 10 or 20 or 30) { }

if (level is Level.Administrator or Level.Manager) { }

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@CypherPotato
Comment options

@FaustVX
Comment options

@CypherPotato
Comment options

@CypherPotato
Comment options

Answer selected by CypherPotato
Comment options

You must be logged in to vote
3 replies
@CypherPotato
Comment options

@FaustVX
Comment options

@KennethHoff
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants