<t>Just cast the enum, e.g.<br/>
<br/>
int something = (int) Question.Role;<br/>
<br/>
```<br/>
<br/>
The above will work for the vast majority of enums you see in the wild, as the default underlying type for an enum is `int`.<br/>
<br/>
However, as [cecilphillip](https://stackoverflow.com/users/333082/cecilphillip) points out, enums can have different underlying types.<br/>
If an enum is declared as a `uint`, `long`, or `ulong`, it should be cast to the type of the enum; e.g. for<br/>
<br/>
```<br/>
enum StarsInMilkyWay:long {Sun = 1, V645Centauri = 2 .. Wolf424B = 2147483649};<br/>
<br/>
```<br/>
<br/>
you should use<br/>
<br/>
```<br/>
long something = (long)StarsInMilkyWay.Wolf424B;<br/>
<br/>
```</t>