KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Possible Duplicate: Anyone know a good workaround for the lack of an enum generic constraint? What is the reason behind C# not allowing type constraints on Enum 's? I'm sure there is a method behind the madness, but I'd like to understand why it's not possible. Below is what I would like to be able to do (in theory). public static T GetEnum<T>(this string description) where T : Enum { ... }
Tags (comma-separated)
Save Edits
Cancel