<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Splitting a Generic List&#60;T&#62; into Multiple Chunks</title>
	<link>http://www.chinhdo.com/20080515/chunking/</link>
	<description>Chinh's not quite random thoughts on software development, .NET, gadgets, and other things.</description>
	<pubDate>Sat, 06 Sep 2008 02:45:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
		<item>
		<title>By: Chinh Do</title>
		<link>http://www.chinhdo.com/20080515/chunking/#comment-3737</link>
		<dc:creator>Chinh Do</dc:creator>
		<pubDate>Wed, 04 Jun 2008 03:21:09 +0000</pubDate>
		<guid>http://www.chinhdo.com/20080515/chunking/#comment-3737</guid>
		<description>Hi Anjo: I checked my code again and it does work as expected (I did have a pretty comprehensive unit test for it). However, you have very sharp eyes and your version also works just fine. When list.Count - index == chunkSize, either the left side or right side of the equation will get you the same thing.

Thanks for the comment. It was a good brain excercise.

Chinh</description>
		<content:encoded><![CDATA[<p>Hi Anjo: I checked my code again and it does work as expected (I did have a pretty comprehensive unit test for it). However, you have very sharp eyes and your version also works just fine. When list.Count - index == chunkSize, either the left side or right side of the equation will get you the same thing.</p>
<p>Thanks for the comment. It was a good brain excercise.</p>
<p>Chinh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anjo</title>
		<link>http://www.chinhdo.com/20080515/chunking/#comment-3731</link>
		<dc:creator>Anjo</dc:creator>
		<pubDate>Tue, 03 Jun 2008 12:27:49 +0000</pubDate>
		<guid>http://www.chinhdo.com/20080515/chunking/#comment-3731</guid>
		<description>(list.Count - index) gives the number of remaining elements including the index element.  So it doesn't have to be greater than chunkSize, rather greater than or equal.

I think this line:

int count = list.Count - index &#62; chunkSize ? chunkSize : list.Count - index;

should be:

int count = list.Count - index &#62;= chunkSize ? chunkSize : list.Count - index;

Thanks for the post - helped me with a problem I was having.</description>
		<content:encoded><![CDATA[<p>(list.Count - index) gives the number of remaining elements including the index element.  So it doesn&#8217;t have to be greater than chunkSize, rather greater than or equal.</p>
<p>I think this line:</p>
<p>int count = list.Count - index &gt; chunkSize ? chunkSize : list.Count - index;</p>
<p>should be:</p>
<p>int count = list.Count - index &gt;= chunkSize ? chunkSize : list.Count - index;</p>
<p>Thanks for the post - helped me with a problem I was having.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - May 16, 2008 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://www.chinhdo.com/20080515/chunking/#comment-3637</link>
		<dc:creator>Dew Drop - May 16, 2008 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Fri, 16 May 2008 12:37:05 +0000</pubDate>
		<guid>http://www.chinhdo.com/20080515/chunking/#comment-3637</guid>
		<description>[...] Splitting a Generic List&#60;T&#62; Into Multiple Chunks (Chinh Do) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Splitting a Generic List&lt;T&gt; Into Multiple Chunks (Chinh Do) [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
