public Enum Days
{
Monday = 1,
Tuesday = 2,
Wednesday = 3,
Thursday = 4,
Friday = 5,
Saturday = 6,
Sunday = 7
}
Now I wanted to know how do I get the integer value of an enum and convert an integer value into enum
Will
int dayNo = (int) Days.Monday;
change the value of dayNo to 1;
and
Will
Days day = (Days) 2;
assign Days.Tuesday to the variable day ??
How about is this the best way to do the parsing??