diff --git a/src/Polyfill/Nullability/NullabilityInfoContext.cs b/src/Polyfill/Nullability/NullabilityInfoContext.cs index fc2dbe3e..42b0ef0f 100644 --- a/src/Polyfill/Nullability/NullabilityInfoContext.cs +++ b/src/Polyfill/Nullability/NullabilityInfoContext.cs @@ -222,7 +222,8 @@ public NullabilityInfo Create(PropertyInfo propertyInfo) if (setter != null) { - CheckNullabilityAttributes(nullability, setter.GetParameters()[^1].GetCustomAttributesData()); + var parameters = setter.GetParameters(); + CheckNullabilityAttributes(nullability, parameters[parameters.Length-1].GetCustomAttributesData()); } else {