cIn C# there is a null conditional operator ?.
(sometimes called the Elvis operator) like so:
var name = project?.customer?.name;
which doesn't fail but instead return null
if project
or customer
is null.
Is there an equivalent in VB.NET?
Note that I am not looking for If(b, x, y)
but the very ?.
replacement.
?:
, but C# never had?:
. When C# gained?.
, the same name was used unofficially.