Skip to content

Commit f6e5d1c

Browse files
committed
remove null check
1 parent fc381a2 commit f6e5d1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/System.Windows.Forms.Design/src/System/ComponentModel/Design/Serialization/DesignerSerializationManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ protected virtual object CreateInstance(Type type, ICollection? arguments, strin
278278

279279
object?[] tempArgs = new object?[argArray.Length];
280280
// Walk the public constructors looking for one to invoke here with the arguments we have.
281-
foreach (ConstructorInfo ci in TypeDescriptor.GetReflectionType(type).GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance))
281+
foreach (ConstructorInfo info in TypeDescriptor.GetReflectionType(type).GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.CreateInstance))
282282
{
283-
ParameterInfo[] parameters = ci.GetParameters();
284-
if (parameters is not null && parameters.Length == types.Length)
283+
ParameterInfo[] parameters = info.GetParameters();
284+
if (parameters.Length == types.Length)
285285
{
286286
bool match = true;
287287
// Walk every type of argument we have and see if it matches up exactly or is a derived type of corresponding constructor argument.

0 commit comments

Comments
 (0)