SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the TryParse method that returns true if it successful:
Age age; if(Enum.TryParse<Age>("myString", out age)) { //Here you can use age }