??运算符

2017-09-18  本文已影响5人  晓龙酱
Person p;
Person tmp = new Person();
p = p ?? tmp;   // 如果p为空,则取tmp,否则不变
上一篇 下一篇

猜你喜欢

热点阅读