Consider this:
public enum Foo {
BAR = "foobar"
}
Now if I access the enum with:
var foobar = Foo.BAR;
foobar holds the String "foobar". If I didn't assign the String to the enum it would be 0.
Is there a way to access the ordinal of this enum as in other languages even if I assign a value to the enum??
Something like:
Foo.BAR.ordinal()