<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>DotNetKicks.com - Stories tagged with foreach</title>
    <description>the latest stories tagged with 'foreach' from DotNetKicks.com</description>
    <link>http://www.dotnetkicks.com/</link>
    <language>en-us</language>
    <copyright>Atweb Publishing Ltd.</copyright>
    <docs>http://backend.userland.com/rss</docs>
    <generator>DotNetKicks.com - .NET links, community driven</generator>
    <ttl>30</ttl>
    <item>
      <title>Lists: Filter, Map and Reduce - and the Magic of IEnumerator.</title>
      <description>There are 3 very handy list functions which make dealing with lists a breeze: Map, Filter and Reduce.  But along the way of writing them, an important principle of IEnumerator&amp;lt;&amp;gt; comes up. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2008%2f08%2f25%2flists-filter-map-and-reduce-and-the-magic-of-ienumerator.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2008%2f08%2f25%2flists-filter-map-and-reduce-and-the-magic-of-ienumerator.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Lists_Filter_Map_and_Reduce_and_the_Magic_of_IEnumerator</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Lists_Filter_Map_and_Reduce_and_the_Magic_of_IEnumerator</guid>
      <pubDate>Tue, 26 Aug 2008 01:49:30 GMT</pubDate>
    </item>
    <item>
      <title>Why System.Linq.Enumerable doesn't have a ForEach extension method</title>
      <description>Lots of people suggest a ForEach method would be a good addition to the base class framework. This is why I don't think it would be, even though our core library has an implementation of it. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fgregbeech.com%2fblogs%2ftech%2farchive%2f2008%2f06%2f30%2fwhy-doesn-t-system-linq-enumerable-have-a-foreach-extension-method.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fgregbeech.com%2fblogs%2ftech%2farchive%2f2008%2f06%2f30%2fwhy-doesn-t-system-linq-enumerable-have-a-foreach-extension-method.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/linq/Why_System_Linq_Enumerable_doesn_t_have_a_ForEach_extension_method</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/linq/Why_System_Linq_Enumerable_doesn_t_have_a_ForEach_extension_method</guid>
      <pubDate>Mon, 30 Jun 2008 15:14:43 GMT</pubDate>
    </item>
    <item>
      <title>JavaScript ForEach Equivalent</title>
      <description>One thing with the For Loop in JavaScript is it doesn't seem to be very well documented that you can use it to do an equivalent of a ForEach loop. Here's a short example of doing the ForEach loop equivalent in JavaScript using the &amp;quot;in&amp;quot; keyword. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fpietschsoft.com%2fpost%2f2008%2f02%2fJavaScript-ForEach-Equivalent.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fpietschsoft.com%2fpost%2f2008%2f02%2fJavaScript-ForEach-Equivalent.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/ajax/JavaScript_ForEach_Equivalent</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/ajax/JavaScript_ForEach_Equivalent</guid>
      <pubDate>Fri, 29 Feb 2008 00:29:28 GMT</pubDate>
    </item>
    <item>
      <title>Create elegant code with Action delegate and List.ForEach method</title>
      <description>Small example of how to use Action delegate to perform some action on all elements of a collection. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdotnettipoftheday.org%2ftips%2faction_delegate_with_foreach.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdotnettipoftheday.org%2ftips%2faction_delegate_with_foreach.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Create_elegant_code_with_Action_delegate_and_List_ForEach_method</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Create_elegant_code_with_Action_delegate_and_List_ForEach_method</guid>
      <pubDate>Mon, 12 Nov 2007 12:46:02 GMT</pubDate>
    </item>
    <item>
      <title>What's inside a foreach() statement?</title>
      <description>A comparision of a foreach() loop and manually looping by calling GetEnumerator() and MoveNext() &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2007%2f05%2f18%2fwhat-s-inside-a-foreach-statement.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fhonestillusion.com%2fblogs%2fblog_0%2farchive%2f2007%2f05%2f18%2fwhat-s-inside-a-foreach-statement.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/What_s_inside_a_foreach_statement</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/What_s_inside_a_foreach_statement</guid>
      <pubDate>Fri, 18 May 2007 07:46:49 GMT</pubDate>
    </item>
    <item>
      <title>Only iterating over the objects you want in a foreach loop</title>
      <description>Have you ever had a collection made of several types which all derive from the same base class?  How many times have you needed to iterate the whole collection and check each element to make sure its the type that you want to work with?  Here's how to do you type checking completely inline inside of the foreach loop so you only get the objects you want. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.jeremyjarrell.com%2farchive%2f2007%2f02%2f22%2f6.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.jeremyjarrell.com%2farchive%2f2007%2f02%2f22%2f6.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Only_iterating_over_the_objects_you_want_in_a_foreach_loop</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Only_iterating_over_the_objects_you_want_in_a_foreach_loop</guid>
      <pubDate>Sun, 25 Feb 2007 12:01:01 GMT</pubDate>
    </item>
    <item>
      <title>Performance of foreach vs. List.ForEach</title>
      <description>Today I was iterating a List&amp;lt;int&amp;gt; using a foreach-loop and feeling a bit smug in knowing how much more performance-conscious I was being than if I'd tried doing the same thing with an ArrayList filled with ints. Thanks to the wonder of generics, the C# compiler neatly avoids numerous boxing operations by using a System.Collections.Generic.IEnumerator&amp;lt;int&amp;gt; instance instead of the older System.Collections.IEnumerator. Then I got to thinking: &amp;quot;is this really the fastest way?&amp;quot; Upon investigation, it turns that, no, it isn't the fastest way. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fdiditwith.net%2fPermaLink%2cguid%2c506c0888-8c5f-40e5-9d39-a09e2ebf3a55.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fdiditwith.net%2fPermaLink%2cguid%2c506c0888-8c5f-40e5-9d39-a09e2ebf3a55.aspx" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;
</description>
      <link>http://www.dotnetkicks.com/csharp/Performance_of_foreach_vs_List_ForEach</link>
      <guid isPermaLink="true">http://www.dotnetkicks.com/csharp/Performance_of_foreach_vs_List_ForEach</guid>
      <pubDate>Sat, 07 Oct 2006 08:01:02 GMT</pubDate>
    </item>
  </channel>
</rss>