diff --git a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/TypeCodeDomSerializer.cs b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/TypeCodeDomSerializer.cs index d44eb887da5..86d1afdaba4 100644 --- a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/TypeCodeDomSerializer.cs +++ b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/TypeCodeDomSerializer.cs @@ -548,7 +548,7 @@ private void IntegrateStatements(IDesignerSerializationManager manager, object r { map.Combine(); typeDecl.Members.Add(map.Method); - Trace(TraceLevel.Verbose, $"...generated {map.Method.Statements.Count} statements into method {map.Method.Name}"); + Trace(TraceLevel.Verbose, $"...generated {map.Method!.Statements.Count} statements into method {map.Method.Name}"); } } } diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/DesignerActionBehavior.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/DesignerActionBehavior.cs index aa706e3a280..b8166d840fe 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/DesignerActionBehavior.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/DesignerActionBehavior.cs @@ -12,13 +12,13 @@ namespace System.Windows.Forms.Design.Behavior; /// internal sealed class DesignerActionBehavior : Behavior { - private readonly IServiceProvider? _serviceProvider; // we need to cache the service provider here to be able to create the panel with the proper arguments + private readonly IServiceProvider _serviceProvider; // we need to cache the service provider here to be able to create the panel with the proper arguments private bool _ignoreNextMouseUp; /// /// Constructor that calls base and caches off the action lists. /// - internal DesignerActionBehavior(IServiceProvider? serviceProvider, IComponent relatedComponent, DesignerActionListCollection actionLists, DesignerActionUI parentUI) + internal DesignerActionBehavior(IServiceProvider serviceProvider, IComponent relatedComponent, DesignerActionListCollection actionLists, DesignerActionUI parentUI) { ActionLists = actionLists; _serviceProvider = serviceProvider;