Blog
Using Reserved Words as Identifiers in VB.Net
Up until now, if I wanted to use a reserved keyword as a variable, function or property name (such as Public Property ReadOnly() As Boolean), the compiler would complain.
Luckily I happened across a very simple answer yesterday; VB.Net works in a similar way to SQL - to use a reserved word as an identifier, just put square brackets around it!
i.e. Public Property [ReadOnly]() As Boolean
File under: things I can't believe I didn't know!


Reader Comments
Skip to form
April 16, 2009
,ryla says:THANKS works like a charm