C# – Enum generic type constraint
In C# 7.3, Microsoft added the ability to specify an Enum as a generic constraint, like this: Whenever you have a generic method, it’s a good idea to use generic type constraints. Without constraints, you would have to implement type checking in the generic method and throw exceptions if an invalid type was used. With … Read more