We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad48bed commit 52b1ccbCopy full SHA for 52b1ccb
Dapper/CommandDefinition.cs
@@ -182,9 +182,7 @@ private static Action<IDbCommand> GetInit(Type commandType)
182
private static MethodInfo GetBasicPropertySetter(Type declaringType, string name, Type expectedType)
183
{
184
var prop = declaringType.GetProperty(name, BindingFlags.Public | BindingFlags.Instance);
185
- ParameterInfo[] indexers;
186
- if (prop != null && prop.CanWrite && prop.PropertyType == expectedType
187
- && ((indexers = prop.GetIndexParameters()) == null || indexers.Length == 0))
+ if (prop != null && prop.CanWrite && prop.PropertyType == expectedType && prop.GetIndexParameters().Length == 0)
188
189
return prop.GetSetMethod();
190
}
0 commit comments