Are the plans to make null conditional (object?.thing) and null coalescent (??, ??=) operators more consistent with the behaviour of boolean null comparison? (e.g.) If the '==' operator is overloaded on specific objects to treat them as null and return a true for null comparison (even when they aren't actually).
Imho, given that both operators are essentially syntactic sugar over comparison with null, it makes sense to have them run the the overloaded logic for the == operator if one exists for the object.
C# after all is a very cohesive language ;-)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Are the plans to make null conditional (object?.thing) and null coalescent (??, ??=) operators more consistent with the behaviour of boolean null comparison? (e.g.) If the '==' operator is overloaded on specific objects to treat them as null and return a true for null comparison (even when they aren't actually).
Imho, given that both operators are essentially syntactic sugar over comparison with null, it makes sense to have them run the the overloaded logic for the == operator if one exists for the object.
C# after all is a very cohesive language ;-)