Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Dim s As String and Dim s As [String]?

What is the difference between:

Dim s As String

and

Dim s As [String]
like image 368
Alexa Avatar asked Nov 24 '25 15:11

Alexa


1 Answers

There is no difference.

In VB, you can wrap an identifier in brackets to force it to be parsed as an identifier and not a keyword.

For example, you can write

Dim [If], [As], [Dim]

without any syntax errors.

The brackets have no effect other than indicating that the identifier isn't a keyword, so someVar and [someVar] are identical.

like image 50
SLaks Avatar answered Nov 26 '25 18:11

SLaks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!