Rarely used C# Keywords(dotnetcube.com)

submitted by dncdudedncdude(1350) 2 years, 8 months ago

When doing code reviews or when working with code that was developed by someone else, once in a while I come across keywords that are rarely used. Some of them are forgotten keywords that are not considered a good practice and hence are not promoted by the community. Some of them could be handy and efficient but they never made it to the limelight.

4 comments |category: |Views: 1244

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 syedtayyabalisyedtayyabali(135) 2 years, 8 months ago 0

@dncdude: you deserve kick.
:D

Reply

posted by gregbeechgregbeech(76) 2 years, 8 months ago 0

Rarely used?? The "using" keyword should be used frequently by anybody dealing with disposable resources. And the rest aren't even keywords: (yield is a contextual keyword, which anyone using a functional style will use frequently, ?? is an operator, @ is syntax, and ForEach is a method!

Reply

posted by senfosenfo(881) 2 years, 8 months ago 0

If you're not familiar with the "keywords" (most of which aren't even keywords, but whatever) then you should become more familiar with them. With exception to the ForEach() method (which I personally don't like), I use almost every one of these almost daily. A using statement is especially necessary.

Reply

posted by senfosenfo(881) 2 years, 8 months ago 0

My mistake. Didn't read the wording around @ and assumed you were talking about C# strings that are not escaped. But that would be a naming rule. It certainly isn't a keyword.

Reply

information Login or create an account to comment on this story