July 10th, 2009, 03:22 AM
Get Enum Index Value??
Is it Possible to get the "Index Value" or position from an Enum?
There are no apparent properties of a defined ENUM only the individual elements. I know I can assign my Enum Values to an Array (one by one) and index through Them, but I was hoping to be able to directly access the elements of the Enum by index.
Optionally is there a nice clean way to assign the Enum to an Array?
Regardless of the Array Style (Dynamic / Static) ,Variable Type, or initialization state I can't seem to be able to assign the values without Looping Through each element. I've tried assigning the array to the Enum definition and a defined variable of the enum. Nothing works, which then of course makes me question the value of the Enum over individual constant declarations, aside from the Intellisense popups. So I come back to the conclusion that I'm missing something in regards to Enum usage. Any insight would be appreciated.
Tags for this Thread
Click Here to Expand Forum to Full Width