-3

What does this sign (!) mean? Exemple

If dt.Rows.Count > 0 Then
            Dim dr As DataRow
            dr = dt.Rows(0)
            Form_main.p1.Enabled = dr!p1
             Close()
        End If
luk2302
  • 55,258
  • 23
  • 97
  • 137
Mady
  • 7
  • 3

1 Answers1

0

It accesses the indexer of the object's type. In your case dr!p1 is short for dr("p1").

You have to consider whether the confusion caused by this unusual syntax is worth the 3 keystrokes you save.

Dave Doknjas
  • 6,394
  • 1
  • 15
  • 28