jzh-314

生活<>生存

导航

运算符“??”

  了解就不用看了,不了解的一眼就明白了。

  

  // ?? operator example.
        int? x = null;

        // y = x, unless x is null, in which case y = -1.
        int y = x ?? -1;

posted on 2010-04-16 13:05  jizh  阅读(843)  评论(0编辑  收藏  举报