From another layer in an application I can get back the name of the enum type and an integer value. How can I use this data to get the string representation of that value for that enum.
For example, if I have an enum:
public enum Cheese
{
Edam = 1,
Cheddar = 3,
Brie = 201,
RedLeicester = 1001
}
and the data I have available is
string dataType = "Cheese";
int dataValue = 3;
How can I get the result:
"Cheddar"