Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2003 Server
>>>>TBH I used C# to write this and used a converter to get the VB version. IIRC the usual reason to use square brackets around a string in VB is to avoid confusing the compiler when the text itself if a VB.NET keyword but I don't think it is actually neccessary in this context.....
>>
>>I think Gregory actually gave the right answer.
>>GetType([Object]) works OK but is identical to just GetType(Object)
>>You were probably thinking of the static Type.GetType("System.Object") which would also work.
>>The square bracket usage is normally for things like:
>>Dim [integer] As Integer
>>Without the [] it will refuse to compile since 'integer' is a keyword (same sort of usage occurs in T-SQL ?)
>>Not good practice of course......
>
>
>The brackets puzzled me for a while
Like using "int @int;" in C#. Ughh...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement