<?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: C#: Refactoring to functional collection parameters</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Functional Collection Parameters: A different way of thinking about collections at Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/comment-page-1/#comment-18828</link>
		<dc:creator>Functional Collection Parameters: A different way of thinking about collections at Mark Needham</dc:creator>
		<pubDate>Thu, 18 Jun 2009 14:13:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=893#comment-18828</guid>
		<description>[...] written previously about the ways I&#039;ve been making use of functional collection parameters in my code but what I hadn&#039;t really considered was that the way of [...]</description>
		<content:encoded><![CDATA[<p>[...] written previously about the ways I&#8217;ve been making use of functional collection parameters in my code but what I hadn&#8217;t really considered was that the way of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - February 3, 2009 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/comment-page-1/#comment-7736</link>
		<dc:creator>Dew Drop - February 3, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Tue, 03 Feb 2009 14:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=893#comment-7736</guid>
		<description>[...] C#: Refactoring to Functional Collection Parameters (Mark Needham) [...]</description>
		<content:encoded><![CDATA[<p>[...] C#: Refactoring to Functional Collection Parameters (Mark Needham) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #278</title>
		<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/comment-page-1/#comment-7651</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #278</dc:creator>
		<pubDate>Tue, 03 Feb 2009 08:16:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=893#comment-7651</guid>
		<description>[...] C#: Refactoring to functional collection parameters - Mark Needham shows some of the nice collection refactorings that are possible in C#3 [...]</description>
		<content:encoded><![CDATA[<p>[...] C#: Refactoring to functional collection parameters &#8211; Mark Needham shows some of the nice collection refactorings that are possible in C#3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/comment-page-1/#comment-7559</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Tue, 03 Feb 2009 00:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=893#comment-7559</guid>
		<description>Ah cool, didn&#039;t realise that! 

Thanks for the FirstOrDefault tip as well - was wondering how to do that.</description>
		<content:encoded><![CDATA[<p>Ah cool, didn&#8217;t realise that! </p>
<p>Thanks for the FirstOrDefault tip as well &#8211; was wondering how to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Clowers</title>
		<link>http://www.markhneedham.com/blog/2009/02/03/c-refactoring-to-functional-collection-parameters/comment-page-1/#comment-7551</link>
		<dc:creator>Robin Clowers</dc:creator>
		<pubDate>Tue, 03 Feb 2009 00:05:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=893#comment-7551</guid>
		<description>Good post Mark, I too enjoy these kinds of refactorings (careful though, it can be addicting)!  

Anyway, in your GetSpecialFoo example, you can simplify by passing your predicate (Foo =&gt; foo.HasSpecialFlag()) into the First method, eliminating the call to Where.  Also, First will throw an exception if it never finds any items matching the predicate, so you should really use FirstOrDefault to match the functionality of the original method.</description>
		<content:encoded><![CDATA[<p>Good post Mark, I too enjoy these kinds of refactorings (careful though, it can be addicting)!  </p>
<p>Anyway, in your GetSpecialFoo example, you can simplify by passing your predicate (Foo =&gt; foo.HasSpecialFlag()) into the First method, eliminating the call to Where.  Also, First will throw an exception if it never finds any items matching the predicate, so you should really use FirstOrDefault to match the functionality of the original method.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

