What does [String] mean?

  • Thread starter Thread starter Rob Richardson
  • Start date Start date
R

Rob Richardson

Greetings!

The help page for the DictionaryBase class includes a class with the
following property:

Default Public Property Item(key As [String]) As [String]
Get
Return CType(Dictionary(key), [String])
End Get
Set
Dictionary(key) = value
End Set
End Property

I have never before seen a type surrounded by brackets. What does it mean?

Thanks very much!

Rob
 
In this instance, it means absolutly nothing. AFAIK, its only used when you
want to use a keyword/class name as avariable..

i.e

Dim [Assembly] as Assembly

Maybe I have that wrong, but thats all I've ever seen it for.

-cJ
 
Yup, seems right to me. Only ever used it to hide keyword in variable name.

CJ Taylor said:
In this instance, it means absolutly nothing. AFAIK, its only used when you
want to use a keyword/class name as avariable..

i.e

Dim [Assembly] as Assembly

Maybe I have that wrong, but thats all I've ever seen it for.

-cJ
Rob Richardson said:
Greetings!

The help page for the DictionaryBase class includes a class with the
following property:

Default Public Property Item(key As [String]) As [String]
Get
Return CType(Dictionary(key), [String])
End Get
Set
Dictionary(key) = value
End Set
End Property

I have never before seen a type surrounded by brackets. What does it mean?

Thanks very much!

Rob
 
* "Rob Richardson said:
The help page for the DictionaryBase class includes a class with the
following property:

Default Public Property Item(key As [String]) As [String]
Get
Return CType(Dictionary(key), [String])
End Get
Set
Dictionary(key) = value
End Set
End Property

I have never before seen a type surrounded by brackets. What does it mean?

It doesn't make sense in the sample above. Documentation:

<URL:http://msdn.microsoft.com/library/en-us/vbls7/html/vblrfVBSpec2_2.asp>
 
Back
Top