Keywords as variables. Documentation
I don't believe in using them, just name your variables something meaningful.
Dim _name As String ' better choice - has meaning now.
题
Someone can explain me which are the differences between using the Square brackets [ ] as this:
Private Function FindItem([ListView] As [ListView], [ColumnIndex] As [Int32], [SearchString] As [String], Optional [IgnoreCase] As [Boolean] = False) As Boolean
...And this else:
Private Function FindItem(ListView As ListView, ColumnIndex As Integer, SearchString As String, Optional ByVal IgnoreCase As Boolean = False) As Boolean
Both works with the same passed arguments.
Where I can learn about this strange vb.net operator?
解决方案 2
Keywords as variables. Documentation
I don't believe in using them, just name your variables something meaningful.
Dim _name As String ' better choice - has meaning now.
其他提示
In your example, there is no difference. The brackets are used to allow the use of reserved words.
Example :
Dim [String] As String = Nothing
[String] = "My String has a poor name"
The [] around the names allows you to use a reserved word.