<?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>Head.SmackOnTable(); &#187; collections</title>
	<atom:link href="http://www.unauthorised-access.com/tag/collections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unauthorised-access.com</link>
	<description>Contains Nuts.</description>
	<lastBuildDate>Fri, 06 Jan 2012 11:15:02 +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>I want my .ForEach(System.Action)!</title>
		<link>http://www.unauthorised-access.com/2008/10/i-want-my-foreachsystemaction/</link>
		<comments>http://www.unauthorised-access.com/2008/10/i-want-my-foreachsystemaction/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 16:38:45 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[collections]]></category>
		<category><![CDATA[dictionary]]></category>
		<category><![CDATA[IEnumerable]]></category>
		<category><![CDATA[resharper]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=48</guid>
		<description><![CDATA[Well I was adding things to a dictionary today (Because im lazy, I have to store 2 values, and I really cant be bothered with creating a class just for that), and I wanted to run a ForEach(System.Action&#60;T&#62;) on it, because I like doing that on System.Collections.Generic.List&#60;t&#62; &#8211; it works well, so why change what [...]]]></description>
			<content:encoded><![CDATA[<p>Well I was adding things to a dictionary today (Because im lazy, I have to store 2 values, and I really cant be bothered with creating a class just for that), and I wanted to run a ForEach(System.Action&lt;T&gt;) on it, because I like doing that on System.Collections.Generic.List&lt;t&gt; &#8211; it works well, so why change what you know?</p>
<p>But, it turns out Dictionary&lt;TKey, TValue&gt; dosent have a .ForEach. It implements IEnumerable, but it dosent have support for the .ForEach, which is rather strange, since they both do the same thing, but it dosent have the Action&lt;T&gt; method. So I did some digging, and found that .ForEach is a method that belongs to List&lt;T&gt;, and its pretty much the only way to do it (There is a System.Array.Foreach(T[] array, Action&lt;T&gt;) method, but that dosent work with a dictionary.</p>
<p>What I see happening is me extending Dictionary&lt;TKey, TValue&gt; to add a .ForEach (And the other functions that are missing from it, in my opinion at least), because I think that since it implements IEnumerable&lt;T&gt;, it should support .ForEach.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2008/10/i-want-my-foreachsystemaction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

