No, they are equivalent in VB. From the documentation:
Use the !
operator only on a class or interface as a dictionary access operator. The class or interface must have a default property that accepts a single String
argument. The identifier immediately following the !
operator becomes the argument value passed to the default property as a string.
Since Fields
is the "default" property for Recordset
and Item
is the default property for Fields
,
RS!field
is compiled to
RS.Fields("field")
which is technically
RS.Fields.Item("field")
Note that you can also do
RS("field")
is one better/faster/preferred over the other?
Faster? No. Preferred? Well the latter usage is more consistent with other .NET languages, so it may be preferred in larger circles because of that.