<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Yield and generics rock!</title><link>http://weblogs.asp.net/bleroy/archive/2004/08/31/223531.aspx</link><description>In this post, I'll try to show you why you should not limit your use of generics to strongly typed lists , and why yield may become your favorite new keyword. Here's an example of how you can use both in a very simple piece of code. Imagine you want to</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Sebastien Bouchet shows an actual implementation of the same thing with 1.1</title><link>http://weblogs.asp.net/bleroy/archive/2004/08/31/223531.aspx#244193</link><pubDate>Mon, 18 Oct 2004 22:57:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:244193</guid><dc:creator>TrackBack</dc:creator><author>TrackBack</author><description>And it IS considerably more verbose, though quite elegant thanks to delegates. Thanks, Sebastien!&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=244193" width="1" height="1"&gt;</description></item><item><title>Great post about iterators.</title><link>http://weblogs.asp.net/bleroy/archive/2004/08/31/223531.aspx#224354</link><pubDate>Thu, 02 Sep 2004 00:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:224354</guid><dc:creator>TrackBack</dc:creator><author>TrackBack</author><description>Great post about iterators.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=224354" width="1" height="1"&gt;</description></item><item><title>re: Yield and generics rock!</title><link>http://weblogs.asp.net/bleroy/archive/2004/08/31/223531.aspx#223565</link><pubDate>Tue, 31 Aug 2004 21:36:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:223565</guid><dc:creator>Wesner Moise</dc:creator><author>Wesner Moise</author><description>For more concisely is to use the following iterator method&lt;br&gt;&lt;br&gt;IEnumerable&amp;lt;T&amp;gt; FilteredEnumerable&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; en, Predicate&amp;lt;T&amp;gt; pred)&lt;br&gt;{&lt;br&gt;      foreach(T t in en)&lt;br&gt;         if ( pred(t) )&lt;br&gt;             yield return t;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=223565" width="1" height="1"&gt;</description></item><item><title>re: Yield and generics rock!</title><link>http://weblogs.asp.net/bleroy/archive/2004/08/31/223531.aspx#223561</link><pubDate>Tue, 31 Aug 2004 21:29:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:223561</guid><dc:creator>Mike Griggs</dc:creator><author>Mike Griggs</author><description>C# starts to look more and more like C++/STL with every passing day...&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=223561" width="1" height="1"&gt;</description></item></channel></rss>