<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Convert Generic List In To DataTable</title>
	<atom:link href="http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/feed/" rel="self" type="application/rss+xml" />
	<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/</link>
	<description>Amit Patriwala</description>
	<lastBuildDate>Tue, 15 Dec 2009 11:56:26 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dryer Vent Cleaning</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-318</link>
		<dc:creator>Dryer Vent Cleaning</dc:creator>
		<pubDate>Sat, 19 Sep 2009 04:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-318</guid>
		<description>Great site...keep up the good work.</description>
		<content:encoded><![CDATA[<p>Great site&#8230;keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vijeya</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-265</link>
		<dc:creator>vijeya</dc:creator>
		<pubDate>Thu, 23 Jul 2009 16:22:22 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-265</guid>
		<description>awesome</description>
		<content:encoded><![CDATA[<p>awesome</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Perry</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-247</link>
		<dc:creator>Perry</dc:creator>
		<pubDate>Thu, 02 Jul 2009 15:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-247</guid>
		<description>Great post. Ran into same issue as Sakthi with nullable type. Here is what worked for me:

Type colType = prop.PropertyType;
if ((colType.IsGenericType))
{
colType = colType.GetGenericArguments()[0];
}
tb.Columns.Add(prop.Name, colType);</description>
		<content:encoded><![CDATA[<p>Great post. Ran into same issue as Sakthi with nullable type. Here is what worked for me:</p>
<p>Type colType = prop.PropertyType;<br />
if ((colType.IsGenericType))<br />
{<br />
colType = colType.GetGenericArguments()[0];<br />
}<br />
tb.Columns.Add(prop.Name, colType);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sakthi</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-243</link>
		<dc:creator>Sakthi</dc:creator>
		<pubDate>Fri, 19 Jun 2009 08:59:37 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-243</guid>
		<description>Excellent post.. It helpmed a lot in time... Really superb. 

I have got an error in CreateTable method. Err is &quot;DataSet does not support System.Nullable&quot;. Solution for this is before adding the column to the table just do a check as below. 

Type colType = prop.PropertyType;
if ((colType.IsGeneric­Type) &amp;&amp; (colType.GetGeneric­TypeDefinition() == typeof(Nullable))­)
{
colType = colType.GetGenericA­rguments()[0];
}
destTable.Columns.A­dd(new DataColumn(prop.Nam­e, colType));

Correct me if am wrong. Hope this helps someone.

Thanks.</description>
		<content:encoded><![CDATA[<p>Excellent post.. It helpmed a lot in time&#8230; Really superb. </p>
<p>I have got an error in CreateTable method. Err is &#8220;DataSet does not support System.Nullable&#8221;. Solution for this is before adding the column to the table just do a check as below. </p>
<p>Type colType = prop.PropertyType;<br />
if ((colType.IsGeneric­Type) &amp;&amp; (colType.GetGeneric­TypeDefinition() == typeof(Nullable))­)<br />
{<br />
colType = colType.GetGenericA­rguments()[0];<br />
}<br />
destTable.Columns.A­dd(new DataColumn(prop.Nam­e, colType));</p>
<p>Correct me if am wrong. Hope this helps someone.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jemson Sentillas</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-223</link>
		<dc:creator>Jemson Sentillas</dc:creator>
		<pubDate>Wed, 29 Apr 2009 19:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-223</guid>
		<description>Very useful article..</description>
		<content:encoded><![CDATA[<p>Very useful article..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irfan</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-222</link>
		<dc:creator>Irfan</dc:creator>
		<pubDate>Wed, 29 Apr 2009 10:45:38 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-222</guid>
		<description>Excellent Guruuuuuuuuuuuuuuuu !!</description>
		<content:encoded><![CDATA[<p>Excellent Guruuuuuuuuuuuuuuuu !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trungqt84</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-217</link>
		<dc:creator>trungqt84</dc:creator>
		<pubDate>Fri, 17 Apr 2009 14:53:35 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-217</guid>
		<description>thank you very much about your example.</description>
		<content:encoded><![CDATA[<p>thank you very much about your example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DotNetter</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-192</link>
		<dc:creator>DotNetter</dc:creator>
		<pubDate>Tue, 10 Feb 2009 21:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-192</guid>
		<description>Very useful</description>
		<content:encoded><![CDATA[<p>Very useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patriwala</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-155</link>
		<dc:creator>patriwala</dc:creator>
		<pubDate>Thu, 11 Dec 2008 09:53:23 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-155</guid>
		<description>Hi petter,
Thanks For your valuable comment.

thnx</description>
		<content:encoded><![CDATA[<p>Hi petter,<br />
Thanks For your valuable comment.</p>
<p>thnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: petter</title>
		<link>http://amitpatriwala.wordpress.com/2008/12/03/convert-generic-list-in-to-datatable/#comment-154</link>
		<dc:creator>petter</dc:creator>
		<pubDate>Thu, 11 Dec 2008 09:51:21 +0000</pubDate>
		<guid isPermaLink="false">http://amitpatriwala.wordpress.com/?p=379#comment-154</guid>
		<description>hi Patriwala,

excellent stuff…! u kept it simple…

Thanks a million…….!!!!!!!!!!</description>
		<content:encoded><![CDATA[<p>hi Patriwala,</p>
<p>excellent stuff…! u kept it simple…</p>
<p>Thanks a million…….!!!!!!!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
