操作符: ??
用法:C = A ?? B;
解释:if(A != null){ C=A;} else{C=B} 类似三元运算符 :?
例子: Int32? num1=null; Int32? num2=2;
Int32 num3=num1 ?? num2 ?? 3; //2
2021-11-05 12:01:13
操作符: ??
用法:C = A ?? B;
解释:if(A != null){ C=A;} else{C=B} 类似三元运算符 :?
例子: Int32? num1=null; Int32? num2=2;
Int32 num3=num1 ?? num2 ?? 3; //2