Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validating on Overridable method
Message
De
07/09/2011 13:12:20
 
 
À
07/09/2011 13:01:41
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01522449
Message ID:
01522918
Vues:
17
>>>>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
Fil
Voir

Click here to load this message in the networking platform