Open hughbe opened 5 years ago
Got a few things on the priority list, but we can consider adding this to the roadmap. @OliaG for Roadmap thoughts.
Implementing NRT to the whole code base would be a massive work, but enabling it only for the API surface would be much easier and yet very helpful for customers who uses both winforms and NRT.
Something we did on project system, CPS and other projects is to add <Nullable>enable</Nullable>
to project files, then use a regular expression to add #nullable disable
to each and every source file.
This encourages new code to be written using NRT, and provides an annotation to-do list by searching for #nullable disable
.
For commonly used types where annotations would be useful, but it's too challenging to fix all generated warnings, it's possible to use #nullable annotations
which allows adding ?
to types without having to address any warnings.
Thank you @drewnoakes, this may be a way forward.
#nullable annotations
@drewnoakes where is this documented? VS syntax highlight it, but the compiler is bothered:
CS8637 Expected 'enable', 'disable', or 'restore'
Edit: Oh, nevermind, got it. It's #nullable enable annotations
.
I've done this for a few projects to date, and may be able to help here.
Now that #2702 and #2756 are merged, I encourage everyone interested to send PRs covering small parts of the API for NRT in SWF.
When annotating Windows Forms types verify that the Runtime types are NRT enabled (refer to https://github.com/dotnet/runtime/issues/2339).
List of files in System.Windows.Forms
which need annotation, ordered by line count ascending.
\src\System\Windows\Forms\IDataGridColumnStyleEditingNotificationService.cs 11
\src\System\Windows\Forms\IFileReaderService.cs 11
\src\System\Drawing\Design\PropertyValueUIHandler.cs 14
\src\System\Drawing\Design\PropertyValueUIItemInvokeHandler.cs 15
\src\System\Windows\Forms\RichTextBoxConstants.cs 15
\src\System\Windows\Forms\ISupportToolStripPanel.cs 16
\src\System\Windows\Forms\DataGridViewRowCollection.RowComparer.ComparedObjectMax.cs 17
\src\System\Windows\Forms\MergeHistory.cs 18
\src\System\Windows\Forms\AxHost.ClsidAttribute.cs 19
\src\System\Windows\Forms\DataGridViewIntLinkedListElement.cs 19
\src\System\Windows\Forms\ICurrencyManagerProvider.cs 21
\src\System\Windows\Forms\DataGridViewEditingCell.cs 22
\src\System\Windows\Forms\ToolStripDropDownMenu.ToolStripDropDownLayoutEngine.cs 25
\src\System\Windows\Forms\WindowsFormsSectionHandler.cs 26
\src\System\Windows\Forms\TableLayoutColumnStyleCollection.cs 28
\src\System\Windows\Forms\TableLayoutRowStyleCollection.cs 28
\src\System\Drawing\Design\PropertyValueUIItem.cs 32
\src\System\Windows\Forms\DataGridViewColumnDesignTimeVisibleAttribute.cs 32
\src\System\Windows\Forms\DataGridViewSortCompareEventArgs.cs 32
\src\System\Windows\Forms\TableLayoutControlCollection.cs 32
\src\System\Windows\Forms\ToolStripPanel.ToolStripPanelControlCollection.XYComparer.cs 33
\src\System\Windows\Forms\ToolStripPanel.ToolStripPanelControlCollection.YXComparer.cs 33
\src\System\Windows\Forms\BaseCollection.cs 36
\src\System\Windows\Forms\PropertyGridInternal\ArrayElementGridEntry.cs 38
\src\System\Windows\Forms\DataGridViewComboBoxCell.ItemComparer.cs 38
\src\System\Drawing\Design\IPropertyValueUIService.cs 39
\src\System\Windows\Forms\DataGridViewCellLinkedListElement.cs 39
\src\System\Windows\Forms\TypeValidationEventArgs.cs 41
\src\System\Windows\Forms\TypedControlCollection.cs 42
\src\System\Windows\Forms\ReadOnlyControlCollection.cs 47
\src\System\Windows\Forms\PropertyGridInternal\PropertyGridView.GridPositionData.cs 50
\src\System\Windows\Forms\DataGridView.ControlCollection.cs 53
\src\System\Windows\Forms\DataGridView.ToolTip.cs 58
\src\System\Windows\Forms\ListManagerBindingsCollection.cs 59
\src\System\Windows\Forms\ToolStripPanel.FeedbackRectangle.cs 64
\src\System\Windows\Forms\MDIClient.ControlCollection.cs 65
\src\System\Windows\Forms\Design\IUIService.cs 70
\src\System\Windows\Forms\HtmlWindow.HTMLWindowEvents2.cs 74
\src\System\Windows\Forms\Layout\TableLayout.LayoutInfo.cs 75
\src\System\Windows\Forms\AxHost.PropertyBagStream.cs 75
\src\System\Windows\Forms\DataGridViewSelectedRowCollection.cs 76
\src\System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs 77
\src\System\Windows\Forms\DataGridViewSelectedColumnCollection.cs 78
\src\System\Windows\Forms\TabControl.ControlCollection.cs 79
\src\System\Windows\Forms\PropertyGridInternal\MergePropertyDescriptor.MultiMergeCollection.cs 80
\src\System\Windows\Forms\DataGridViewTextBoxColumn.cs 91
\src\System\Windows\Forms\PropertyGridInternal\ImmutablePropertyDescriptorGridEntry.cs 93
\src\System\Windows\Forms\RelatedPropertyManager.cs 93
\src\System\Windows\Forms\HtmlWindowCollection.cs 97
\src\System\Windows\Forms\HtmlHistory.cs 98
\src\System\Windows\Forms\BindingsCollection.cs 102
\src\System\Windows\Forms\DataGridViewSelectedCellCollection.cs 105
\src\System\Windows\Forms\HtmlWindow.HtmlWindowShim.cs 105
\src\System\Windows\Forms\HtmlElementEventArgs.cs 106
\src\System\Windows\Forms\DataGridView.HitTestInfo.cs 112
\src\System\Windows\Forms\DataGridViewRowCollection.RowArrayList.cs 116
\src\System\Windows\Forms\PropertyGrid.PropertyTabCollection.cs 116
\src\System\Windows\Forms\HtmlDocument.HtmlDocumentShim.cs 118
\src\System\Windows\Forms\TableLayoutStyleCollection.cs 121
\src\System\Windows\Forms\HtmlToClrEventProxy.cs 131
\src\System\Windows\Forms\DataGridViewRowCollection.RowComparer.cs 133
\src\System\Windows\Forms\HtmlElement.HtmlElementShim.cs 138
\src\System\Windows\Forms\TableLayoutPanelCellPosition.cs 139
\src\System\Windows\Forms\AutoCompleteStringCollection.cs 144
\src\System\Windows\Forms\HtmlShim.cs 145
\src\System\Windows\Forms\TableLayoutSettings.TableLayoutSettingsStub.cs 146
\src\System\Windows\Forms\ControlBindingsCollection.cs 156
\src\System\Windows\Forms\DataGridViewComboBoxEditingControl.cs 158
\src\System\Windows\Forms\HtmlDocument.HTMLDocumentEvents2.cs 158
\src\System\Windows\Forms\DataGridViewCellPaintingEventArgs.cs 162
\src\System\Windows\Forms\WindowsFormsSynchronizationContext.cs 164
\src\System\Windows\Forms\MDIControlStrip.cs 168
\src\System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollection.cs 168
\src\System\Windows\Forms\HtmlElementCollection.cs 169
\src\System\Windows\Forms\WebBrowser.WebBrowserSite.cs 174
\src\System\Windows\Forms\DataGridViewCellLinkedList.cs 175
\src\System\Windows\Forms\RelatedCurrencyManager.cs 180
\src\System\Windows\Forms\DataGridViewIntLinkedList.cs 183
\src\System\Windows\Forms\PropertyManager.cs 189
\src\System\Windows\Forms\WebBrowser.WebBrowserEvent.cs 191
\src\System\Windows\Forms\DataGridViewButtonColumn.cs 209
\src\System\Windows\Forms\HtmlShimManager.cs 229
\src\System\Windows\Forms\HelpProvider.cs 235
\src\System\Windows\Forms\PropertyGridInternal\SingleSelectRootGridEntry.cs 237
\src\System\Windows\Forms\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs 254
\src\System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollection.cs 259
\src\System\Windows\Forms\ImageListStreamer.cs 261
\src\System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs 261
\src\System\Windows\Forms\DataGridViewImageColumn.cs 287
\src\System\Windows\Forms\PropertyGridInternal\MergePropertyDescriptor.cs 297
\src\System\Windows\Forms\HtmlElement.HTMLElementEvents2.cs 299
\src\System\Windows\Forms\DataGridViewCheckBoxColumn.cs 300
\src\System\Windows\Forms\DataGridViewCellCollection.cs 310
\src\System\Windows\Forms\ErrorProvider.ControlItem.cs 312
\src\System\Windows\Forms\Layout\FlowLayout.cs 330
\src\System\Windows\Forms\DataGridViewLinkColumn.cs 336
\src\System\Windows\Forms\AxHost.AxPropertyDescriptor.cs 341
\src\System\Windows\Forms\DataGridViewTopLeftHeaderCell.cs 350
\src\System\Windows\Forms\MessageBox.cs 359
\src\System\Windows\Forms\HtmlWindow.cs 367
\src\System\Windows\Forms\WebBrowserSiteBase.cs 373
\src\System\Windows\Forms\ListView.ListViewNativeItemCollection.cs 392
\src\System\Windows\Forms\ComboBox.ObjectCollection.cs 421
\src\System\Windows\Forms\ListView.ListViewItemCollection.cs 436
\src\System\Windows\Forms\ToolStripItemCollection.cs 446
\src\System\Windows\Forms\Formatter.cs 469
\src\System\Windows\Forms\DataGridViewComboBoxColumn.cs 478
\src\System\Windows\Forms\DataGridViewHeaderCell.cs 574
\src\System\Windows\Forms\HtmlDocument.cs 580
\src\System\Windows\Forms\TreeNodeCollection.cs 616
\src\System\Windows\Forms\ListBindingHelper.cs 618
\src\System\Windows\Forms\HtmlElement.cs 624
\src\System\Windows\Forms\ToolStripSplitStackLayout.cs 635
\src\System\Windows\Forms\ToolStripPanelRow.cs 655
\src\System\Windows\Forms\DataGridViewTextBoxCell.cs 703
\src\System\Windows\Forms\PropertyGridInternal\PropertyDescriptorGridEntry.cs 762
\src\System\Windows\Forms\DataGridViewCellStyle.cs 775
\src\System\Windows\Forms\ToolStripControlHost.cs 799
\src\System\Windows\Forms\BindingNavigator.cs 819
\src\System\Windows\Forms\DataGridViewImageCell.cs 834
\src\System\Windows\Forms\DataGridViewButtonCell.cs 940
\src\System\Windows\Forms\CurrencyManager.cs 998
\src\System\Windows\Forms\DataGridViewRowHeaderCell.cs 1002
\src\System\Windows\Forms\DataGridViewColumn.cs 1011
\src\System\Windows\Forms\DataGridViewLinkCell.cs 1021
\src\System\Windows\Forms\DataGridViewColumnCollection.cs 1053
\src\System\Windows\Forms\Layout\DefaultLayout.cs 1063
\src\System\Windows\Forms\PictureBox.cs 1079
\src\System\Windows\Forms\DataGridViewColumnHeaderCell.cs 1105
\src\System\Windows\Forms\AxHost.AxContainer.cs 1137
\src\System\Windows\Forms\Binding.cs 1151
\src\System\Windows\Forms\ListViewItem.cs 1163
\src\System\Windows\Forms\WebBrowser.cs 1307
\src\System\Windows\Forms\ToolStripManager.cs 1317
\src\System\Windows\Forms\Layout\TableLayout.cs 1330
\src\System\Windows\Forms\DataGridView.DataConnection.cs 1475
\src\System\Windows\Forms\WebBrowserBase.cs 1588
\src\System\Windows\Forms\DataGridViewCheckBoxCell.cs 1591
\src\System\Windows\Forms\BindingSource.cs 1597
\src\System\Windows\Forms\DataGridViewRow.cs 1602
\src\System\Windows\Forms\PropertyGridInternal\GridEntry.cs 1894
\src\System\Windows\Forms\TabControl.cs 1949
\src\System\Windows\Forms\TreeNode.cs 2010
\src\System\Windows\Forms\ToolTip.cs 2069
\src\System\Windows\Forms\DataGridViewRowCollection.cs 2206
\src\System\Windows\Forms\DataGridViewComboBoxCell.cs 2326
\src\System\Windows\Forms\TreeView.cs 3158
\src\System\Windows\Forms\RichTextBox.cs 3220
\src\System\Windows\Forms\ComboBox.cs 3530
\src\System\Windows\Forms\DataGridViewCell.cs 3671
\src\System\Windows\Forms\AxHost.cs 3698
\src\System\Windows\Forms\PropertyGrid.cs 3764
\src\System\Windows\Forms\ToolStrip.cs 4373
\src\System\Windows\Forms\PropertyGridInternal\PropertyGridView.cs 4650
\src\System\Windows\Forms\DataGridView.cs 4658
\src\System\Windows\Forms\Control.cs 12737
\src\System\Windows\Forms\DataGridView.Methods.cs 27098
Powershell code used:
Get-ChildItem -re -in "*.cs" |
Foreach-Object {
$fileStats = Get-Content $_.FullName | Measure-Object -line
$word='#nullable disable'
$found = Select-String -Path $_ -Pattern $word -SimpleMatch -Quiet
$linesInFile = $fileStats.Lines
Write-Host "$_,$linesInFile,$found"
}
List of files in System.Windows.Forms
which need annotation, ordered by line count ascending.
\src\System\Drawing\Design\IPropertyValueUIService.cs 39
\src\System\Windows\Forms\DataGridViewCellLinkedListElement.cs 39
\src\System\Windows\Forms\ListManagerBindingsCollection.cs 59
\src\System\Windows\Forms\MDIClient.ControlCollection.cs 65
\src\System\Windows\Forms\Design\IUIService.cs 70
\src\System\Windows\Forms\HtmlWindow.HTMLWindowEvents2.cs 74
\src\System\Windows\Forms\Layout\TableLayout.LayoutInfo.cs 75
\src\System\Windows\Forms\DataGridViewSelectedRowCollection.cs 76
\src\System\Windows\Forms\Layout\FlowLayout.ElementProxy.cs 77
\src\System\Windows\Forms\DataGridViewSelectedColumnCollection.cs 78
\src\System\Windows\Forms\TabControl.ControlCollection.cs 79
\src\System\Windows\Forms\PropertyGridInternal\MergePropertyDescriptor.MultiMergeCollection.cs 80
\src\System\Windows\Forms\DataGridViewTextBoxColumn.cs 91
\src\System\Windows\Forms\PropertyGridInternal\ImmutablePropertyDescriptorGridEntry.cs 93
\src\System\Windows\Forms\RelatedPropertyManager.cs 93
\src\System\Windows\Forms\HtmlWindowCollection.cs 97
\src\System\Windows\Forms\BindingsCollection.cs 102
\src\System\Windows\Forms\DataGridViewSelectedCellCollection.cs 105
\src\System\Windows\Forms\HtmlWindow.HtmlWindowShim.cs 105
\src\System\Windows\Forms\HtmlElementEventArgs.cs 106
\src\System\Windows\Forms\DataGridView.HitTestInfo.cs 112
\src\System\Windows\Forms\DataGridViewRowCollection.RowArrayList.cs 116
\src\System\Windows\Forms\HtmlDocument.HtmlDocumentShim.cs 119
\src\System\Windows\Forms\HtmlToClrEventProxy.cs 131
\src\System\Windows\Forms\DataGridViewRowCollection.RowComparer.cs 133
\src\System\Windows\Forms\HtmlElement.HtmlElementShim.cs 138
\src\System\Windows\Forms\AutoCompleteStringCollection.cs 144
\src\System\Windows\Forms\HtmlShim.cs 145
\src\System\Windows\Forms\TableLayoutSettings.TableLayoutSettingsStub.cs 146
\src\System\Windows\Forms\ControlBindingsCollection.cs 156
\src\System\Windows\Forms\DataGridViewComboBoxEditingControl.cs 158
\src\System\Windows\Forms\HtmlDocument.HTMLDocumentEvents2.cs 158
\src\System\Windows\Forms\DataGridViewCellPaintingEventArgs.cs 162
\src\System\Windows\Forms\MDIControlStrip.cs 168
\src\System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollection.cs 168
\src\System\Windows\Forms\HtmlElementCollection.cs 169
\src\System\Windows\Forms\WebBrowser.WebBrowserSite.cs 171
\src\System\Windows\Forms\DataGridViewCellLinkedList.cs 175
\src\System\Windows\Forms\RelatedCurrencyManager.cs 180
\src\System\Windows\Forms\DataGridViewIntLinkedList.cs 183
\src\System\Windows\Forms\WebBrowser.WebBrowserEvent.cs 188
\src\System\Windows\Forms\PropertyManager.cs 189
\src\System\Windows\Forms\DataGridViewButtonColumn.cs 209
\src\System\Windows\Forms\HtmlShimManager.cs 228
\src\System\Windows\Forms\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs 254
\src\System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollection.cs 259
\src\System\Windows\Forms\ImageListStreamer.cs 261
\src\System\Windows\Forms\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs 261
\src\System\Windows\Forms\DataGridViewImageColumn.cs 287
\src\System\Windows\Forms\PropertyGridInternal\MergePropertyDescriptor.cs 297
\src\System\Windows\Forms\HtmlElement.HTMLElementEvents2.cs 299
\src\System\Windows\Forms\DataGridViewCheckBoxColumn.cs 300
\src\System\Windows\Forms\DataGridViewCellCollection.cs 310
\src\System\Windows\Forms\Layout\FlowLayout.cs 330
\src\System\Windows\Forms\DataGridViewLinkColumn.cs 336
\src\System\Windows\Forms\AxHost.AxPropertyDescriptor.cs 338
\src\System\Windows\Forms\HtmlWindow.cs 343
\src\System\Windows\Forms\DataGridViewTopLeftHeaderCell.cs 350
\src\System\Windows\Forms\WebBrowserSiteBase.cs 370
\src\System\Windows\Forms\ListView.ListViewNativeItemCollection.cs 392
\src\System\Windows\Forms\ComboBox.ObjectCollection.cs 421
\src\System\Windows\Forms\ListView.ListViewItemCollection.cs 436
\src\System\Windows\Forms\ToolStripItemCollection.cs 448
\src\System\Windows\Forms\DataGridViewComboBoxColumn.cs 478
\src\System\Windows\Forms\HtmlDocument.cs 557
\src\System\Windows\Forms\DataGridViewHeaderCell.cs 574
\src\System\Windows\Forms\HtmlElement.cs 600
\src\System\Windows\Forms\TreeNodeCollection.cs 616
\src\System\Windows\Forms\ListBindingHelper.cs 618
\src\System\Windows\Forms\ToolStripSplitStackLayout.cs 635
\src\System\Windows\Forms\ToolStripPanelRow.cs 655
\src\System\Windows\Forms\DataGridViewTextBoxCell.cs 703
\src\System\Windows\Forms\PropertyGridInternal\PropertyDescriptorGridEntry.cs 762
\src\System\Windows\Forms\ToolStripControlHost.cs 763
\src\System\Windows\Forms\DataGridViewCellStyle.cs 764
\src\System\Windows\Forms\DataGridViewImageCell.cs 834
\src\System\Windows\Forms\DataGridViewButtonCell.cs 940
\src\System\Windows\Forms\CurrencyManager.cs 998
\src\System\Windows\Forms\DataGridViewColumn.cs 1011
\src\System\Windows\Forms\DataGridViewRowHeaderCell.cs 1014
\src\System\Windows\Forms\DataGridViewLinkCell.cs 1021
\src\System\Windows\Forms\DataGridViewColumnCollection.cs 1053
\src\System\Windows\Forms\Layout\DefaultLayout.cs 1063
\src\System\Windows\Forms\PictureBox.cs 1083
\src\System\Windows\Forms\DataGridViewColumnHeaderCell.cs 1105
\src\System\Windows\Forms\Binding.cs 1151
\src\System\Windows\Forms\ListViewItem.cs 1163
\src\System\Windows\Forms\WebBrowser.cs 1307
\src\System\Windows\Forms\ToolStripManager.cs 1317
\src\System\Windows\Forms\Layout\TableLayout.cs 1330
\src\System\Windows\Forms\DataGridView.DataConnection.cs 1475
\src\System\Windows\Forms\WebBrowserBase.cs 1584
\src\System\Windows\Forms\DataGridViewCheckBoxCell.cs 1591
\src\System\Windows\Forms\BindingSource.cs 1597
\src\System\Windows\Forms\DataGridViewRow.cs 1602
\src\System\Windows\Forms\PropertyGridInternal\GridEntry.cs 1909
\src\System\Windows\Forms\TabControl.cs 1949
\src\System\Windows\Forms\TreeNode.cs 2010
\src\System\Windows\Forms\ToolTip.cs 2075
\src\System\Windows\Forms\DataGridViewRowCollection.cs 2206
\src\System\Windows\Forms\DataGridViewComboBoxCell.cs 2320
\src\System\Windows\Forms\TreeView.cs 3158
\src\System\Windows\Forms\RichTextBox.cs 3201
\src\System\Windows\Forms\ComboBox.cs 3541
\src\System\Windows\Forms\AxHost.cs 3615
\src\System\Windows\Forms\DataGridViewCell.cs 3653
\src\System\Windows\Forms\PropertyGrid.cs 3780
\src\System\Windows\Forms\ToolStrip.cs 4362
\src\System\Windows\Forms\DataGridView.cs 4654
\src\System\Windows\Forms\PropertyGridInternal\PropertyGridView.cs 4669
\src\System\Windows\Forms\Control.cs 11967
\src\System\Windows\Forms\DataGridView.Methods.cs 27098
@gpetrou I am maintaining a list of files that need annotating here. I have been working down the list.
@elachlan please note that I have pending PRs for some of these files and that some of the rest are partially annotated. Also, as I have mentioned before, I am not planning to do any work on DataGridView-related files.
We've made great progress in .NET 8 all, thank you so much!! I'm moving this issue to .NET 9 and we'll keep going with more next release.
Remaining files that need annotation
File | Lines Of Code -- | -- src\System\Windows\Forms\Binding.cs | 1031 src\System\Windows\Forms\BindingSource.cs | 1592 src\System\Windows\Forms\CurrencyManager.cs | 954 src\System\Windows\Forms\DataGridView.DataConnection.cs | 1440 src\System\Windows\Forms\DataGridView.Methods.cs | 27195 src\System\Windows\Forms\DataGridViewCell.cs | 3633 src\System\Windows\Forms\DataGridViewCheckBoxCell.cs | 1602 src\System\Windows\Forms\DataGridViewCheckBoxColumn.cs | 288 src\System\Windows\Forms\DataGridViewColumnCollection.cs | 1049 src\System\Windows\Forms\DataGridViewColumnHeaderCell.cs | 1080 src\System\Windows\Forms\DataGridViewComboBoxCell.cs | 2292 src\System\Windows\Forms\DataGridViewComboBoxColumn.cs | 466 src\System\Windows\Forms\DataGridViewHeaderCell.cs | 545 src\System\Windows\Forms\DataGridViewImageCell.cs | 829 src\System\Windows\Forms\DataGridViewIntLinkedList.cs | 179 src\System\Windows\Forms\DataGridViewLinkColumn.cs | 324 src\System\Windows\Forms\DataGridViewRowHeaderCell.cs | 1010 src\System\Windows\Forms\PropertyGrid.cs | 3776 src\System\Windows\Forms\PropertyGridInternal\GridEntry.cs | 1902 src\System\Windows\Forms\PropertyGridInternal\MultiSelectRootGridEntry.PropertyMerger.cs | 251 src\System\Windows\Forms\PropertyGridInternal\PropertyDescriptorGridEntry.cs | 759 src\System\Windows\Forms\PropertyGridInternal\PropertyGridView.cs | 4667 src\System\Windows\Forms\TreeNode.cs | 1869We've completely enabled nullability for System.Windows.Forms assembly, which is amazing! Thank you all so much 🥳 I will move this over to .NET 10 and we will keep going with the other assemblies e.g. https://github.com/dotnet/winforms/issues/8342
Once CoreFx and CoreCLR fully support nullability it would be great to do this in winforms
Probably a large project...