How to get the numeric value from the Enum?

Solution 1:

For the majority of Enum's simply cast to the base type which is int32.

int value = (int)System.Net.HttpStatusCode.Forbidden;

Solution 2:

You can just cast it to an integer!

int code = (int)enumVariable