Enum Question

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi,

How do I pick the correct Enum value at runtime (without hard coding) with
the string name of the enum value?

Thanks
 
Use Enum.Parse.

This function will take an enumerator type, and parse a string to the
correct enumerator value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

about enum 3
Enum TypeConverter 3
Enum Extentions 7
Enums & Constructors? 4
Merge Info From Two Enums 1
Reflection - integer values directly to enum 11
Check Flags Enum for Validity 15
I have small probalem 4

Back
Top