Having an odd problem with an enum I'm working with:
public enum EnumTest
{
Value1 = 1,
Value2 = 2,
Value3 = 3
}
int i = 2;
EnumTest val = (EnumTest)i
Result: Value3
It seems when I cast an integer to the enum type, it is casting it by index, not by value.
I want to be able to...