[String]

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been seeing syntax like: [String].Empty in VB.net code and can not find any explaination for the brackets []
 
The brackets are generally used to escape kewords. For example, if you're
defining a class with a property "End", you'd need to escape it so the
compiler won't treat it as a keyword:

Public Class Foo
Public Property [End] as Integer
...
End Propety
End Class

However, there's no need to escape "String.Empty." The code should run fine
without the brackets.


gt said:
I've been seeing syntax like: [String].Empty in VB.net code and can not
find any explaination for the brackets [] ?
 
Back
Top