Criteria: Performance, Performance, Performance.
I need a way to convert a uint, int, etc into it's enum equivalent. What's the fastest way I can do that using C#?
Criteria: Performance, Performance, Performance.
I need a way to convert a uint, int, etc into it's enum equivalent. What's the fastest way I can do that using C#?
Why can't you just do a direct cast?
MyEnum enumVar = (MyEnum)intVar;