C# 7.3 Enum constraint: Why can’t I use the nullable enum?
You can, but you have to add another constraint: the struct constraint. public static void DoSomething<T>(T? defaultValue) where T : struct, Enum { }
You can, but you have to add another constraint: the struct constraint. public static void DoSomething<T>(T? defaultValue) where T : struct, Enum { }
Just had this and a Clean, Rebuild fixed the issue for me.