Can I cast from a generic type to an enum in C#? May 21, 2023 by Tarik Like this: return (T)(object)value;