Okay, I'm accessing the fields of a data row inside a data set using indexers, but let's consider this as just a syntactical feature. Would you go so far and call it a duck typed thing that is reduced to getters and setters, in other words a data transfer object?
+2
A:
Yes, it is. In fact, there's syntax in VB that makes it even more obvious. You can write:
Dim row As DataRow
row!Name = "Foo" 'same as row("Name")
Pavel Minaev
2009-10-01 20:36:31
oh, nice... never heard about that before (but I don't usually code in VB anyway)
Thomas Levesque
2009-10-01 20:48:03
same for me. And to be honest, this is one more reason for disliking VB ("VB.NET. Not since the Vikings named Greenland has there been such a marketing deception." - Juval Lowy)
Marc Wittke
2009-10-02 08:07:30
@Marc, what's wrong with this particular feature? Note how it uses a distinct operator `!`, so there's no way to use this "accidentally". And I find it much more readable than canonical indexer form for cases like datasets and data readers.
Pavel Minaev
2009-10-02 16:09:49