Join Slack
Powered by
Hi all! I'm new to Kotlin, and I was wondering if ...
# getting-started
s
steverichey
04/27/2016, 6:02 PM
Hi all! I'm new to Kotlin, and I was wondering if it's possible to create an enum instance from an internal field. For example...
Copy code
enum class MyEnum(val rawValue: Int) { FirstCase(10), SecondCase(20) }
Is it possible to create an enum for this class from an integer of an unknown value?
Open in Slack
Previous
Next