by billmcneale · 1y ago · 0 comments
Isn't this over engineered? Why not allow the assignment but do nothing if any of the intermediate objects is null (that's how Kotlin does it).
customer?.Profile?.Avatar = "thing"
And will do nothing if the left hand side is null (not throw a null reference exception anymore)