I have a simple Enum
public enum TestEnum { TestOne = 3, TestTwo = 4 } var testing = TestEnum.TestOne;
And I want to retrieve
Just simple.
var value = propertyInfo.GetValue(obj); // this return TestOne or TestTwo var enumValue = Convert.ChangeType(value, typeof(int)); // this return 3 or 4