Reputation: 5524
Given:
public enum myType
{
Val1 = 1,
Val2 = 2,
Val3 = 3
}
and code elsewhere in the app where a value : ... row.myType // resolves to Val1 ...
I need to translate row.myType to 1
Upvotes: 0
Views: 121
Reputation: 1206
myType someEnumVal = myType.Val1;
int intValOfEnum = (int)someEnumVal;
Upvotes: 0