Training
Module
Learn coding practices to help prevent the occurrence of NullReferenceException.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In .NET 9, some nullability annotations on the Windows Forms APIs have changed.
Previously, some parameters were marked as nullable.
Starting in .NET 9, these parameters are marked as non-nullable. If you pass an argument that might be null, you'll get a compiler warning.
.NET 9 Preview 1
This change can affect source compatibility.
The parameter on IWindowsFormsEditorService.DropDownControl(Control) was previously marked as nullable, but there's no guidance for implementers on how they should handle null input. Also, logically this method should not accept null
.
The following table lists the affected APIs:
API | What changed | Recommended action |
---|---|---|
IWindowsFormsEditorService.DropDownControl(Control) | The control parameter is non-nullable |
Make sure you're not passing a nullable Control to this method. Also, update any implementations of IWindowsFormsEditorService to remove nullability of the DropDownControl method's parameter. |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Training
Module
Learn coding practices to help prevent the occurrence of NullReferenceException.