Skip to content

IDE0010 should not complain about missing default case? #65322

Answered by philipborg
rafael-f asked this question in Ideas
Discussion options

You must be logged in to vote

"missing default case when all the other enum members are already in the switch"
That's possible when a numeric value has been cast to the enum. .NET does not guarantee that an enum is one of the defined values. I think it may also be possible with mismatched runtime DLLs but I haven't written a POC for it.

I agree that they should be split however, but it's not irrelevant.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rafael-f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants