Inspection Details

IndexedRecursiveDefaultMemberAccess


Summary
Identifies the use of indexed default member accesses that require a recursive default member resolution.
Reasoning
An indexed default member access hides away the actually called member. This is especially problematic if the corresponding parameterized default member is not on the interface of the object itself.
The following code example(s) would trigger this inspection:

Public Sub DoSomething(ByVal rst As ADODB.Recordset)
    Dim bar As Variant
    bar = rst("MyField")
End Sub

The following code example(s) would not trigger this inspection:

Public Sub DoSomething(ByVal rst As ADODB.Recordset)
    Dim bar As Variant
    bar = rst.Fields.Item("MyField")
End Sub


Back to List