你能解释一下,为什么Console.WriteLine写空行(Console.WriteLine(null)
给我编译错误)以及为什么没有NullReferenceException(甚至a+=1
不应该提高它)?
int? a = null;
a++; // Why there is not NullReferenceException?
Console.WriteLine(a); // Empty line
Run Code Online (Sandbox Code Playgroud)