Keep in touch

you can keep in touch with my all blogs and sites by install this Toolbar...
http://rworldtoolbar.ourtoolbar.com/

Thursday, July 24, 2008

ASP.NET: How To Name A Variable Or Property Using .NET’s “Reserved” Words

Let’s say you want to give your class a boolean property named Error that gets turned on or off if something goes awry in your code. You would think that you can’t do this because the word “Error” is reserved by .NET. However, there is a way. All you have to do is put Square Brackets around the word! For instance:

Public Property [Error]() As Boolean

Do it .! and Enjoying Coding with Reserved Keywords...

Happy Coding..!

No comments: