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.
 
Back
Top