DNK has a spanking new server up and running like clockwork. Stability problems are a thing of the past. Our new monitoring service reports 100% uptime since the move!
35
kicks
published 1 year, 10 months ago, submitted by rprouse rprouse 1 year, 10 months ago

alteridem.net — The yield statement is another often overlooked keyword that was introduced in .NET 2.0. It is used to return items from a loop within a method and retain the state of the method through multiple calls.

Add a comment 2 comments | category: | Views: 79 | Get KickIt image code
The Yield Statement in C#
tags: , | tag it

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:
This is a useful article and I honestly didn't know about yield break, but two better articles (in my opinion) are:

http://msdn2.microsoft.com/en-us/vcsharp/bb264519.aspx
http://blogs.msdn.com/wesdyer/archive/2007/03/23/all-about-iterators.aspx
posted by senfo senfo 1 year, 10 months ago
If you're interested in how the yield keyword actually works, read this:

http://startbigthinksmall.wordpress.com/2008/06/09/behind-the-scenes-of-the-c-yield-keyword/
posted by lcorneliussen 1 year ago



information Login or create an account to comment on this story

Related Stories:
 

Search: