How can an int be cast to an enum in C#?
int
enum
Just cast it:
MyEnum e = (MyEnum)3;
You can check if it's in range using Enum.IsDefined:
if (Enum.IsDefined(typeof(MyEnum), 3)) { ... }