Navigation
Links

Powered by Squarespace
« ClickOnce does not support mandatory user profiles | Main | ISNULL in c# »
Tuesday
Aug302005

yield return “elegant code”

I didn’t think the new iterator pattern in c# 2.0 would be as useful as the other new features. I though, how many problems are solved with enumerators? Well, here is a great example where creating an enumerator isn’t the problem being solved, it’s an elegant HTTP application pipeline that uses the state machine automatically created by the c# compiler for handling asynchronous work. The new yield return statement simplifies the code significantly.

Iterators and Efficient Use of the Thread Pool

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>