<?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: The Missing .NET #2: Collection&lt;T&gt; AddRange()</title>
	<atom:link href="http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/</link>
	<description>Trapped online since 2004</description>
	<lastBuildDate>Wed, 11 Jan 2012 10:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jason Kemp</title>
		<link>http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/comment-page-1/#comment-757</link>
		<dc:creator>Jason Kemp</dc:creator>
		<pubDate>Thu, 17 Feb 2011 14:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/#comment-757</guid>
		<description>In this case, not really. The &lt;code&gt;var&lt;/code&gt; keyword just tells the compiler, &quot;figure out this type for me, we both know what it is, so I don&#039;t have to write out the type name.&quot; You can use it anywhere you declare a method variable.

I can&#039;t say for certain, but I&#039;m pretty sure that the compiler will convert &#039;var&#039; to &#039;T&#039; for us.</description>
		<content:encoded><![CDATA[<p>In this case, not really. The <code>var</code> keyword just tells the compiler, &#8220;figure out this type for me, we both know what it is, so I don&#8217;t have to write out the type name.&#8221; You can use it anywhere you declare a method variable.</p>
<p>I can&#8217;t say for certain, but I&#8217;m pretty sure that the compiler will convert &#8216;var&#8217; to &#8216;T&#8217; for us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Ehrt</title>
		<link>http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/comment-page-1/#comment-756</link>
		<dc:creator>Michael Ehrt</dc:creator>
		<pubDate>Thu, 17 Feb 2011 12:54:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/#comment-756</guid>
		<description>Hmmm ... why is it

foreach (var item in collection)

and not

foreach (T item in collection)

...? Is there a difference to it I can&#039;t spot?</description>
		<content:encoded><![CDATA[<p>Hmmm &#8230; why is it</p>
<p>foreach (var item in collection)</p>
<p>and not</p>
<p>foreach (T item in collection)</p>
<p>&#8230;? Is there a difference to it I can&#8217;t spot?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Collette</title>
		<link>http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/comment-page-1/#comment-745</link>
		<dc:creator>Richard Collette</dc:creator>
		<pubDate>Thu, 02 Dec 2010 14:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/#comment-745</guid>
		<description>I modified the code for the simple FindIndex and Find cases to use a foreach since some collection implementations may have to actually iterate through N elements to get to the Nth element.  When possible I try to avoid indexes in a loop due to the potential performance issues.

With the Find methods, I stored the item being predicated and returned that item rather than getting it again by index due to the reason just mentioned.</description>
		<content:encoded><![CDATA[<p>I modified the code for the simple FindIndex and Find cases to use a foreach since some collection implementations may have to actually iterate through N elements to get to the Nth element.  When possible I try to avoid indexes in a loop due to the potential performance issues.</p>
<p>With the Find methods, I stored the item being predicated and returned that item rather than getting it again by index due to the reason just mentioned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Kelman</title>
		<link>http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/comment-page-1/#comment-443</link>
		<dc:creator>Vladimir Kelman</dc:creator>
		<pubDate>Mon, 14 Jul 2008 16:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.ageektrapped.com/blog/the-missing-net-2-collectiont-addrange/#comment-443</guid>
		<description>Hi! Thank you for your article. In The Visual Studio Code Analysis Team Blog they explained (http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx) how to ensure that we could re-use List methods in our concrete implementation of a generic Collection class, whenever it is necessary. The catch there was that a developer has to remember to call base class constructor : base(new List[Address]()) to guarantee that Collection is actually a List too.
To make developer&#039;s life easier, I proposed to make a generic Collection class with that special type of constructor and all the &quot;missing&quot; methods as well.
Please take a look at http://pro-thoughts.blogspot.com/2008/07/generic-listcollection-class-take-2.html and tell me what you think.</description>
		<content:encoded><![CDATA[<p>Hi! Thank you for your article. In The Visual Studio Code Analysis Team Blog they explained (<a href="http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx" rel="nofollow">http://blogs.msdn.com/fxcop/archive/2006/04/27/585476.aspx</a>) how to ensure that we could re-use List methods in our concrete implementation of a generic Collection class, whenever it is necessary. The catch there was that a developer has to remember to call base class constructor : base(new List[Address]()) to guarantee that Collection is actually a List too.<br />
To make developer&#8217;s life easier, I proposed to make a generic Collection class with that special type of constructor and all the &#8220;missing&#8221; methods as well.<br />
Please take a look at <a href="http://pro-thoughts.blogspot.com/2008/07/generic-listcollection-class-take-2.html" rel="nofollow">http://pro-thoughts.blogspot.com/2008/07/generic-listcollection-class-take-2.html</a> and tell me what you think.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

