Q:

How to convert enum to int

In C# we can convert an enum to an int by static typecasting as shown below:
int res = (int)myEnum;

Is any other way to do this conversion?

A:

There are plenty of other ways (including Convert.ToInt32 as mentioned by acrilige), but a static cast is probably the best choice (as far as readability and performance are concerned)

A:

Best would be:
int res = Convert.ToInt32(myEnum);

OR a static cast
int res = (int)myEnum;

