<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tech News, Tech Resources, Technology Articles, Gadget News, Computer News &#187; .Net</title>
	<atom:link href="http://www.comteken.com/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.comteken.com</link>
	<description>IT news, software technology, IT resources, computer software, laptops, desktops,  information systems,  hardware technology, multimedia, Windows OS, linux clients, network solution, easy internet, essential guides, domains, webhosting, web program, database programming</description>
	<lastBuildDate>Fri, 27 Jan 2012 11:22:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Extending LINQ &#8211; Specifying a Property in the Distinct Function</title>
		<link>http://www.comteken.com/database-programming/extending-linq-specifying-a-property-in-the-distinct-function/</link>
		<comments>http://www.comteken.com/database-programming/extending-linq-specifying-a-property-in-the-distinct-function/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 15:26:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://www.comteken.com/?p=21</guid>
		<description><![CDATA[<a href="http://www.comteken.com/database-programming/extending-linq-specifying-a-property-in-the-distinct-function/"><img align="left" hspace="5" width="100" height="100" src="http://www.comteken.com/wp-content/plugins/thumbnail-for-excerpts/tfe_no_thumb.png" class="alignleft wp-post-image tfe" alt="" title="" /></a>The &#8220;Distinct&#8221; function in LINQ is definitely one of the top 10 most used functions, but it&#8217;s probably one of the top 10 most incomplete as well. This article will show how to extend the IEnumerable interface to allow a very easy way to specify what property makes your list unique (or &#8216;distinct&#8217;). If you [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;Distinct&#8221; function in LINQ is definitely one of the top 10 most used functions, but it&#8217;s probably one of the top 10 most incomplete as well. This article will show how to extend the IEnumerable interface to allow a very easy way to specify what property makes your list unique (or &#8216;distinct&#8217;).</p>
<p>If you are already familiar with the standard query operators in LINQ, then you have no doubt tried to do something like this:</p>
<div><span>// Make a unique list of customers <span>from</span> the big list!</span><br />
<span>var</span> uniqueList = bigList.Distinct(item =&gt; item.ID);<span></p>
<p>// Do something with the unique customers&#8230;</span></div>
<p>The problem is, the &#8220;Distinct&#8221; function doesn&#8217;t let you specify a property by which you call your object &#8216;unique&#8217;. In other words, if you have a collection that has the same customer data in there twice&#8230; calling &#8220;Distinct&#8221; will not remove the duplicate. Note &#8211; this statement requires the following VERY IMPORTANT DISCLAIMER:</p>
<div>
<p>It&#8217;s highly important that you read what I just said above correctly. I said &#8220;the same customer *data*&#8221;&#8230; I did NOT say &#8220;the same customer *object*.&#8221; Why is that significant? &#8211; You will learn the answer to that question further in the article.</p></div>
<h3>How Does LINQ Implement the Distinct Function</h3>
<p>Before we can solve the problem explained above by extending LINQ, we have to understand why the method currently does not remove duplicates in all cases. To understand that, we have to understand how it is removing duplicates at all. &#8211; Hopefully I haven&#8217;t lost you yet <img src='http://www.comteken.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To explain in short &#8211; the Distinct function will iterate through an IEnumerable&lt;T&gt; one item at a time and perform the following pseudo-code:</p>
<ol>
<li>Get the hash code of the current item using the GetHashCode() method which *all* objects in the .NET Framework have.</li>
<li>Check to see if this hash code has been seen before (by checking in a private dictionary hidden from our eyes).</li>
<li>If the hash code is not already in the dictionary, then we simply add the current item to the dictionary and return the object.</li>
<li>If that very same hash code has already been found, then we compare the current item with the last item with that hash to double check uniqueness and return the object if it is unique.</li>
</ol>
<p>Here is what that code *could* look like (but it&#8217;s not exact):</p>
<div><span>var</span> hashedItems = <span>new</span> Dictionary&lt;<span>int</span>, T&gt;();</p>
<p><span>foreach</span> (T item <span>in</span> <span>this</span>.Items)<br />
{<br />
<span>int</span> currentHash = item.GetHashCode();</p>
<p><span>if</span> (hashedItems.ContainsKey(currentHash) == <span>false</span>)<br />
{<br />
hashedItems.Add(currentHash, item);<span></p>
<p>// We&#8217;ve never seen <span>this</span> item before&#8230; <span>return</span> it!</span><br />
yield <span>return</span> item;<br />
}<br />
<span>else</span><br />
{<br />
<span>if</span> (item.Equals(hashedItems[currentHash]) == <span>false</span>)<br />
{<span><br />
// We thought we&#8217;ve seen <span>this</span> item, but guess not&#8230; <span>return</span> it!</span><br />
yield <span>return</span> item;<br />
}<br />
}<br />
}</div>
<p>By the way, did you catch the reason why two objects that represent the same data will not be de-duped? The reason is that step 1 is to use the &#8220;GetHashCode()&#8221; method to do a quick test. The here problem is that you may not consider these following objects to be different, but LINQ would:</p>
<div><span>var</span> personOne = <span>new</span> Person(123, <span>&#8220;Timothy&#8221;</span>, <span>&#8220;Khouri&#8221;</span>);<br />
<span>var</span> personTwo = <span>new</span> Person(123, <span>&#8220;Timothy&#8221;</span>, <span>&#8220;Khouri&#8221;</span>);</div>
<p>The reason why those two objects would be considered &#8216;different&#8217; is because different instances of an object will have different hash codes, even if the &#8216;data&#8217; is the same. Now that we understand enough of what LINQ is doing, we can extend it to meet our simple needs.</p>
<h3>Extending IEnumerable&lt;T&gt;</h3>
<p>So, how do we add our functionality to everything that LINQ is already extending? &#8211; Very easily, extend the only interface that LINQ is extending! As a side note, I recommend putting your code in the &#8220;System.Collections.Generic&#8221; namespace so that once you add a &#8216;using&#8217; (or &#8216;Imports&#8217; in VB) to that namespace, you&#8217;ll automatically tap into your extensions too.</p>
<div><span>// I feel like I&#8217;m working <span>for</span> Microsoft when I use <span>this</span> <span>namespace</span>&#8230;</span><span><br />
// will I <span>get</span> paid <span>for</span> <span>this</span> article? &#8211; Probably not <img src='http://www.comteken.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </span><br />
<span>namespace</span> System.Collections.Generic<br />
{<br />
<span>public</span> <span>static</span> <span>class</span> MyIEnumerableExtensions<br />
{<br />
<span>public</span> <span>static</span> IEnumerable&lt;T&gt; Distinct(<span>this</span> IEnumerable&lt;T&gt; source,<br />
Func&lt;T, <span>object</span>&gt; uniqueCheckerMethod)<br />
{<span><br />
// Extension code here&#8230;</span><br />
}<br />
}<br />
}</div>
<p>So, now that we have our method stub that extends any list (array or collection) by letting the developer specify how he considers an object to be unique, we need to fill in the contents of our function.</p>
<p>Because the &#8220;Distinct&#8221; LINQ extension has an overload that accepts an &#8216;IEqualityComparer&#8217; object, we already have half of the code written for us! So, what we are going to do is create a generic &#8216;comparer&#8217; class and use that to do our filtering. Here is what our extension will look like:</p>
<div><span>public</span> <span>static</span> IEnumerable&lt;T&gt; Distinct(<span>this</span> IEnumerable&lt;T&gt; source,<br />
Func&lt;T, <span>object</span>&gt; uniqueCheckerMethod)<br />
{<br />
<span>return</span> source.Distinct(<span>new</span> GenericComparer&lt;T&gt;(uniqueCheckerMethod));<br />
}</div>
<p>And, our &#8220;GenericComparer&lt;T&gt;&#8221; class will be as follows:</p>
<div><span>public</span> <span>class</span> GenericComparer&lt;T&gt; : IEqualityComparer&lt;T&gt;<br />
{<br />
<span>public</span> GenericComparer(Func&lt;T, <span>object</span>&gt; uniqueCheckerMethod)<br />
{<br />
<span>this</span>._uniqueCheckerMethod = uniqueCheckerMethod;<br />
}</p>
<p><span>private</span> Func&lt;T, <span>object</span>&gt; _uniqueCheckerMethod;</p>
<p><span>bool</span> IEqualityComparer&lt;T&gt;.Equals(T x, T y)<br />
{<br />
<span>return</span> <span>this</span>._uniqueCheckerMethod(x).Equals(<span>this</span>._uniqueCheckerMethod(y));<br />
}</p>
<p><span>int</span> IEqualityComparer&lt;T&gt;.GetHashCode(T obj)<br />
{<br />
<span>return</span> <span>this</span>._uniqueCheckerMethod(obj).GetHashCode();<br />
}<br />
}</div>
<p>Now, I can filter the following list like so:</p>
<div><span>var</span> people = <span>new</span> List&lt;Person&gt;();</p>
<p>people.Add(<span>new</span> Person(123, <span>&#8220;Timothy&#8221;</span>, <span>&#8220;Khouri&#8221;</span>));<br />
people.Add(<span>new</span> Person(124, <span>&#8220;Bob&#8221;</span>, <span>&#8220;Dole&#8221;</span>));<br />
people.Add(<span>new</span> Person(123, <span>&#8220;Timothy&#8221;</span>, <span>&#8220;Khouri&#8221;</span>));<br />
people.Add(<span>new</span> Person(125, <span>&#8220;Gill&#8221;</span>, <span>&#8220;Bates&#8221;</span>));</p>
<p><span>foreach</span> (<span>var</span> person <span>in</span> people.Distinct(p =&gt; p.ID))<br />
{<span><br />
// Only the 3 unique people will be displayed!</span><br />
Console.WriteLine(person.FullName);<br />
}</div>
<h3>Download the Source File</h3>
<p>While the source for this article is very simple (and is spread throughout the article), you may want to download it and test it out for yourself. This project (compiled for Visual Studio 2008 &#8211; .NET 3.5 SP1) has a simple Console app that demonstrates the code above. I encourage you to put some break-points in the code to see how it&#8217;s all working. Here&#8217;s the code: <a href="http://www.singingeels.com/Articles/Articles/UserFile.aspx?FileID=d30bcff1-6d7c-4a83-ba0e-58160583b44a">SingingEels_ExtendingLinqDistinct.zip</a></p>
<p>Source:singingeels.com</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;bodytext=The%20%22Distinct%22%20function%20in%20LINQ%20is%20definitely%20one%20of%20the%20top%2010%20most%20used%20functions%2C%20but%20it%27s%20probably%20one%20of%20the%20top%2010%20most%20incomplete%20as%20well.%20This%20article%20will%20show%20how%20to%20extend%20the%20IEnumerable%20interface%20to%20allow%20a%20very%20easy%20way%20to%20specify%20what%20" title="Digg"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Sphinn"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;notes=The%20%22Distinct%22%20function%20in%20LINQ%20is%20definitely%20one%20of%20the%20top%2010%20most%20used%20functions%2C%20but%20it%27s%20probably%20one%20of%20the%20top%2010%20most%20incomplete%20as%20well.%20This%20article%20will%20show%20how%20to%20extend%20the%20IEnumerable%20interface%20to%20allow%20a%20very%20easy%20way%20to%20specify%20what%20" title="del.icio.us"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;t=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Facebook"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Mixx"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;annotation=The%20%22Distinct%22%20function%20in%20LINQ%20is%20definitely%20one%20of%20the%20top%2010%20most%20used%20functions%2C%20but%20it%27s%20probably%20one%20of%20the%20top%2010%20most%20incomplete%20as%20well.%20This%20article%20will%20show%20how%20to%20extend%20the%20IEnumerable%20interface%20to%20allow%20a%20very%20easy%20way%20to%20specify%20what%20" title="Google Bookmarks"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;Title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="BlinkList"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/blinklist.png" title="BlinkList" alt="BlinkList" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.diigo.com/post?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Diigo"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/diigo.png" title="Diigo" alt="Diigo" /></a>
	<a rel="nofollow"  target="_blank" href="http://cgi.fark.com/cgi/fark/farkit.pl?h=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;u=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Fark"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/fark.png" title="Fark" alt="Fark" /></a>
	<a rel="nofollow"  target="_blank" href="http://faves.com/Authoring.aspx?u=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Faves"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/bluedot.png" title="Faves" alt="Faves" /></a>
	<a rel="nofollow"  target="_blank" href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;headline=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;source=Tech+News%2C+Tech+Resources%2C+Technology+Articles%2C+Gadget+News%2C+Computer+News+IT+news%2C+software+technology%2C+IT+resources%2C+computer+software%2C+laptops%2C+desktops%2C++information+systems%2C++hardware+technology%2C+multimedia%2C+Windows+OS%2C+linux+clients%2C+network+solution%2C+easy+internet%2C+essential+guides%2C+domains%2C+webhosting%2C+web+program%2C+database+programming&amp;summary=The%20%22Distinct%22%20function%20in%20LINQ%20is%20definitely%20one%20of%20the%20top%2010%20most%20used%20functions%2C%20but%20it%27s%20probably%20one%20of%20the%20top%2010%20most%20incomplete%20as%20well.%20This%20article%20will%20show%20how%20to%20extend%20the%20IEnumerable%20interface%20to%20allow%20a%20very%20easy%20way%20to%20specify%20what%20" title="LinkedIn"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Live"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;bm_description=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;plugin=soc" title="MisterWong"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;t=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="MySpace"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvibes.com/share?title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Netvibes"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.netvouz.com/action/submitBookmark?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;popup=no" title="Netvouz"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/netvouz.png" title="Netvouz" alt="Netvouz" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.newsvine.com/_tools/seed&amp;save?u=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;h=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="NewsVine"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/newsvine.png" title="NewsVine" alt="NewsVine" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.propeller.com/submit/?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Propeller"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/propeller.png" title="Propeller" alt="Propeller" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Reddit"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Slashdot"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://socialogs.com/add_story.php?story_url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;story_title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="Socialogs"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/socialogs.png" title="Socialogs" alt="Socialogs" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;title=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function" title="StumbleUpon"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Technorati"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function%20-%20http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F" title="Twitter"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://buzz.yahoo.com/submit/?submitUrl=http%3A%2F%2Fwww.comteken.com%2Fdatabase-programming%2Fextending-linq-specifying-a-property-in-the-distinct-function%2F&amp;submitHeadline=Extending%20LINQ%20-%20Specifying%20a%20Property%20in%20the%20Distinct%20Function&amp;submitSummary=The%20%22Distinct%22%20function%20in%20LINQ%20is%20definitely%20one%20of%20the%20top%2010%20most%20used%20functions%2C%20but%20it%27s%20probably%20one%20of%20the%20top%2010%20most%20incomplete%20as%20well.%20This%20article%20will%20show%20how%20to%20extend%20the%20IEnumerable%20interface%20to%20allow%20a%20very%20easy%20way%20to%20specify%20what%20&amp;submitCategory=science&amp;submitAssetType=text" title="Yahoo! Buzz"><img src="http://www.comteken.com/wp-content/plugins/sociable/images/yahoobuzz.png" title="Yahoo! Buzz" alt="Yahoo! Buzz" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.comteken.com/database-programming/extending-linq-specifying-a-property-in-the-distinct-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

