Since enums are value type and internally integers, is it less expensive to cast them to an int than a cast normally is?
If it is faster, is it because it's value type and not reference type?
Since enums are value type and internally integers, is it less expensive to cast them to an int than a cast normally is?
If it is faster, is it because it's value type and not reference type?
No, because of the way it stores the value internally. There is virtually no C# overhead. The overhead in casting is largely due to the amount of code necessary to go from one type to another, does a new object have to be created and allocated memory, etc...