dotnet/winforms

Annotate or get rid of the null-forgiving operators in PropertyGrid.cs and related files.

Open

#10,686 建立於 2024年1月18日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)C# (922 fork)batch import
help wanted

倉庫指標

Star
 (4,100 star)
PR 合併指標
 (平均合併 14天 22小時) (30 天內合併 56 個 PR)

描述

This is a follow up on https://github.com/dotnet/winforms/pull/10110#discussion_r1360819144.

Investigate if https://github.com/dotnet/winforms/blob/f7d6850caa53f62816d977e737d6cb2a537f0d9a/src/System.Windows.Forms/src/System/Windows/Forms/Controls/PropertyGrid/PropertyGrid.cs#L3770 can be refactored to convince nullability analyzers that fields that are allocated in this method are not null. This would allow us to get rid of the null-forgiving operators. If not realistic, then then each null-forgiving operator should be annotated.

貢獻者指南