c# get enum by value code example
Example 1: c# get enum name from value
string name=(weekdays)2;//returns weekdays which has value 2.Here weekdays is enum name
Example 2: get enum value c#
int something = (int) Question.Role;
string name=(weekdays)2;//returns weekdays which has value 2.Here weekdays is enum name
int something = (int) Question.Role;