This project is read-only.
3
Vote

[Suggestion] Allow null-coalescing operator ?? on unconstrained type parameters in C#

description

Currently C# allows to compare a variable of an unconstrained type parameter type to null, so you can write
x == null ? y : x
but does not allow a natural rewrite of this expression using a null-coalescing operator:
x ?? y
I suggest to allow this.

comments