Using reserved keyword as member names(undocnet.blogspot.com)

submitted by DancoeDancoe(100) 4 years, 1 month ago

show how to use language specific reserved keywords in fields and properties names and the reason why you might want to do that.

4 comments |category: |Views: 2

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by yesthatmcgurkyesthatmcgurk(4063) 4 years, 1 month ago 0

No. Don't.

Reply

posted by JudahGabrielJudahGabriel(783) 4 years, 1 month ago 0

Exactly. Avoid using language keywords as member names.

Reply

posted by DancoeDancoe(100) 4 years, 1 month ago 0

I agree, using language keywords as member names is not a good idea, but you are not in way because of the @ sign you have to prefix the member with. in the article the only place i would use it was when deserializing xml that has elements named like reserved keyword. the xml serializer will match "<string/>" to "public string @string;" with making use of any attribute decoration ie. XmlElementAttribute.

Reply

posted by DancoeDancoe(100) 4 years, 1 month ago 0

typo "with out making use of any attribute..." not "with"

Reply

information Login or create an account to comment on this story