enum question

Hello experts :-)

enum Letters

string a;
Letters letters;

a = "aaa";
letters = a;  //<- how can I do it?

Thank you


Who is Participating?

Improve company productivity with a Business Account.Sign Up

Praveen KumarConnect With a Mentor ArchitectCommented:
string a;
Letters letters;

a = "aaa";
letters = (Letters)Enum.Parse(typeof(Letters), a, true);
Praveen KumarArchitectCommented:
Last boolean value (true above) is for Ignore case or not.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.