<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: yield is elegant</title>
	<atom:link href="http://elegantcode.com/2008/03/24/yield-is-elegant/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/03/24/yield-is-elegant/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yield-is-elegant</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 23:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: Hüseyin Tüfekçilerli</title>
		<link>http://elegantcode.com/2008/03/24/yield-is-elegant/comment-page-1/#comment-18720</link>
		<dc:creator>Hüseyin Tüfekçilerli</dc:creator>
		<pubDate>Thu, 27 Mar 2008 08:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/03/24/yield-is-elegant/#comment-18720</guid>
		<description>Nice. It would be also good to have a parameterized version for this function like this:


private IEnumerable GridRows(DataControlRowType rowType)
{
    GridViewRowCollection rows = gvTimecard.Rows;
    foreach (GridViewRow row in rows)
    {
        if (row.RowType == rowType)
        {
            yield return row;
        }
    }
}

// Usage:
foreach (GridViewRow row in GridRows(DataControlRowType.DataRow))
{
      // do stuff here
}
</description>
		<content:encoded><![CDATA[<p>Nice. It would be also good to have a parameterized version for this function like this:</p>
<p>private IEnumerable GridRows(DataControlRowType rowType)<br />
{<br />
    GridViewRowCollection rows = gvTimecard.Rows;<br />
    foreach (GridViewRow row in rows)<br />
    {<br />
        if (row.RowType == rowType)<br />
        {<br />
            yield return row;<br />
        }<br />
    }<br />
}</p>
<p>// Usage:<br />
foreach (GridViewRow row in GridRows(DataControlRowType.DataRow))<br />
{<br />
      // do stuff here<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #59</title>
		<link>http://elegantcode.com/2008/03/24/yield-is-elegant/comment-page-1/#comment-18652</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #59</dc:creator>
		<pubDate>Wed, 26 Mar 2008 08:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/03/24/yield-is-elegant/#comment-18652</guid>
		<description>[...] yield is elegant - Chris Brandsma talks about a real world use of the yield keyword [...]</description>
		<content:encoded><![CDATA[<p>[...] yield is elegant &#8211; Chris Brandsma talks about a real world use of the yield keyword [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Brandsma</title>
		<link>http://elegantcode.com/2008/03/24/yield-is-elegant/comment-page-1/#comment-18593</link>
		<dc:creator>Chris Brandsma</dc:creator>
		<pubDate>Mon, 24 Mar 2008 22:05:44 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/03/24/yield-is-elegant/#comment-18593</guid>
		<description>I thought about that (but I&#039;m still using .Net 2.0 on my current project).

Wouldn&#039;t DataGrid.DataRows make more sense tho?</description>
		<content:encoded><![CDATA[<p>I thought about that (but I&#8217;m still using .Net 2.0 on my current project).</p>
<p>Wouldn&#8217;t DataGrid.DataRows make more sense tho?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Starr</title>
		<link>http://elegantcode.com/2008/03/24/yield-is-elegant/comment-page-1/#comment-18592</link>
		<dc:creator>David Starr</dc:creator>
		<pubDate>Mon, 24 Mar 2008 21:53:11 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/03/24/yield-is-elegant/#comment-18592</guid>
		<description>This is cool. How about adding you functioanlity as an extesion method to the DataGrid.Rows so that I have DataGrid.Rows.DataRows?</description>
		<content:encoded><![CDATA[<p>This is cool. How about adding you functioanlity as an extesion method to the DataGrid.Rows so that I have DataGrid.Rows.DataRows?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

