Values of null type (created with the null literal) are wrongly assignment compatible with value types.
[ ] - null should not be assignable to variables, properties or indexers of value type
[ ] - null should not be returnable from functions of value type return type
[ ] - null should not be accepted as an actual argument for a parameter of value type
For these purposes, unconstrained generic type or function parameters are not value types - i.e. they should not be assignable from null
Values of null type (created with the
null
literal) are wrongly assignment compatible with value types.[ ] -
null
should not be assignable to variables, properties or indexers of value type [ ] -null
should not be returnable from functions of value type return type [ ] -null
should not be accepted as an actual argument for a parameter of value typeFor these purposes, unconstrained generic type or function parameters are not value types - i.e. they should not be assignable from
null