C# 使用 COALESCE 表达式简化 Null 检查

下面这个判断 null 的语句:

a == null ? b: a
可以用 COALESCE 表达式,简化成:

a ?? b

猜你喜欢

转载自www.cnblogs.com/jasonlai2016/p/10212271.html