Shorthand for nested null checking C#

后端 未结 5 1697
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 09:38

As far as I know there is not a significantly more elegant way to write the following....

string src;
if((ParentContent!= null)
    &&am         


        
5条回答
  •  余生分开走
    2020-12-17 10:04

    We considered it for C# 4 but did not have the budget. It's a nice feature that a lot of people request, so perhaps we'll get it into a future hypothetical language version. No promises.

提交回复
热议问题