📜  在 C# 代码示例中,两个问号一起表示

📅  最后修改于: 2022-03-11 14:48:53.257000             🧑  作者: Mango

代码示例1
var x = foo ?? bar;

// expands to:
var x = foo != null ? foo : bar;

// which further expands to:
if(foo != null)
    var x = foo;
else
    var x = bar;