An Enum is strongly typed so, unlike c++, you can't implicitly cast from an enum to an int and vice versa.
To do your loop using the values() static function to get an array of MyEnum objects:
for(MyEnum myEnum : MyEnum.values()) {
//Do stuff here!
}
Hope that sorts you out,
Shane.