I have following code:
applicationmodel.CurrentState = (ApplicationStateEnum) 0;
where applicationmodel.CurrentState is of Type ApplicationStateEnum. What I was expecting after this code is executed is that CurrentState should represent the 0th value of the Enum. But it still represents numeric value 0 and when I send this object to Razor view engine, it is still displayed is 0 numeric value.
Any idea on what I may be doing wrong?