
[英]How to tell C# nullable type checker that a variable cannot be null after a function call returns?
简洁版本如何让 C# 可空类型检查编译器在调用返回后意识到变量customer不能是 null: .NET 小提琴: https://do.netfiddle.net/ZcgRCV 长版如果我有这样的代码: 当我尝试访问 .FirstName 时,编译器会(正确地)警告我customer可能是. ...