How can I parse a string in VB.NET to enum value?
Example I have this enum:
Public Enum Gender NotDefined Male Female End Enum how can I convert a string "Male" to the Gender enum's Male value?
Dim val = DirectCast([Enum].Parse(GetType(Gender), "Male"), Gender)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With