As the error says, it's not a real enum.
It sounds like you need reflection:
var fields = typeof(Language).GetFields(BindingFlags.Static
| BindingFlags.Public);
foreach (string item in fields.Select(field => field.GetValue(null)))
{
// ...
}
That's assuming there are no other public static fields in the type. You could always filter by type etc.
Jon Skeet
2009-06-02 10:32:07