using System;
// c#-运算符-空合并运算符
namespace ConsoleApp9
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("空合并运算符");
int? a = null;
int b;
b = a ?? 10;
Console.WriteLine("b:"+b);
a = 3;
b = a ?? 10;
Console.WriteLine("b:"+b);
}
}
}

博客围绕C#中的空合并运算符(??)展开,虽未给出具体内容,但可知聚焦于该运算符,它是C#编程里的重要元素,在处理空值等情况有重要作用。
800

被折叠的 条评论
为什么被折叠?



