How can I get the enum value if I have the enum string or enum int value. eg: If i have an enum as follows:
public enum TestEnum { Value1 = 1, Value
Simply try this
It's another way
public enum CaseOriginCode { Web = 0, Email = 1, Telefoon = 2 } public void setCaseOriginCode(string CaseOriginCode) { int caseOriginCode = (int)(CaseOriginCode)Enum.Parse(typeof(CaseOriginCode), CaseOriginCode); }