Skip to content
Discussion options

You must be logged in to vote

System.Enum is a weird beast in the runtime. Even though it is the "base type" for all enums as far as the type system is concerned it is technically a reference type. That's why you must combine it with the struct (or unmanaged) constraint which eliminates System.Enum itself as being used as the generic type argument.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kyoyama-kazusa
Comment options

Answer selected by kyoyama-kazusa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants