Closed
Description
Why is there no mention of the nuance of working with the var keyword in any document on this topic?
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var
"When var is used with nullable reference types enabled, it always implies a nullable reference type even if the expression type isn't nullable."
In my opinion, this outweighs absolutely all the advantages of using nullable reference types and makes reading and refactoring a real hell.
Madness..
Сведения о документе
⚠ Не вносите правки в этот раздел. Это необходимо для связывания страницы сайта docs.microsoft.com с вопросом на GitHub.
- ID: a690704d-da32-dca7-ea3e-66b84fb1d00d
- Version Independent ID: 11f314de-dd3a-362e-b2bb-d0a2133cfc7b
- Content: Ссылочные типы, допускающие значение null
- Content Source: docs/csharp/nullable-references.md
- Product: dotnet-csharp
- Technology: csharp-null-safety
- GitHub Login: @BillWagner
- Microsoft Alias: wiwagn