Operator ‘??’ cannot be applied to operands of type ‘T’ and ‘T’

?? is the null-coalescing operator. It can’t be applied to non-nullable types. Since T can be anything, it can be an int or other primitive, non-nullable type.

If you add the condition where T : class (must be specified before new()) it forces T to be a class instance, which is nullable.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)