Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating on Overridable method
Message
From
07/09/2011 13:01:41
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01522449
Message ID:
01522913
Views:
24
>>>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
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform