I have an enum like this one:
enum dayofweeks:Int { Mon = 1, Tu, We, Th,Fr, Sa, Su }
how to can get raw value of Sa ?
I only know the opposite way:
dayofweeks.Int(RawValue, 6) = Sa
Here:
dayofweeks.Sa.rawValue
Also, why is your capitalization is reversed? Type name should begin with Capital letter, not case name.
And you forgot case keyword in enum declaration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With