I ran some code through an automatic translator for C# to VB, and it translated some code like this:
Public Property Title As [String]
How is this different to
Public Property Title As String
and why do both exist?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Stringis a keyword. If you want to use a keyword as an identifier, you’ll have to enclose it in brackets.[String]is an identifier.Stringkeyword always refers toSystem.Stringclass while[String]can refer to your own class namedStringin the current namespace. Assuming you haveImports System, both refer to the same thing most of the time but they can be different:The primary reason for existence of
[ ]for treating keywords as identifiers is interoperability with libraries from other languages that may use VB keywords as type or member names.