using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int? a;
a = null;//此时输出3
//a = 6;//此时输出6
int b = a ?? 3;
Console.Write(b);
Console.ReadKey();
}
}
}
C#中两个问号的双目运算符
最新推荐文章于 2021-08-31 09:18:25 发布