Any way to access specific element of enumeration?
729894Mar 26 2009 — edited Mar 26 2009Sorry, if the question sounds too goofy for you. I've just become familiar with enums, and don't understand if there is a way to access any element of enum, just like we do with arrays (arr[3]). All that I know is that we can obtain ordinal of a current enum element and also we can cycle through all enum values using for-each loop. But what if I want to aquire random element of enum. And how can I refer to it, if not by index?
Thank you.