Cast an enum, or acquire its value?
Posted: Tue Mar 07, 2017 9:17 am
Hi,
How do I cast an enum to an integer a.k.a. acquire the enums value?
e.g.
How do I get the value for Period.week i.e. 52.
Thanks
How do I cast an enum to an integer a.k.a. acquire the enums value?
e.g.
enum Period
hour = 8736,
working_hour = 2080,
day = 365,
week = 52,
fortnight = 26,
month = 12,
bimonth = 6,
quarter = 4,
third = 3,
semiannual = 2,
annual = 1
How do I get the value for Period.week i.e. 52.
Thanks