Click here to Skip to main content
13,449,902 members (53,540 online)
Click here to Skip to main content
Add your own
alternative version


2 bookmarked
Posted 12 Aug 2011

Convert Datatable to Collection using Generic

, 13 Aug 2011
Very nice!I've modified ToCollection(this DataTable dt) extension function, so if DataTable column names and class property names are different, then you can use this alternative:public static List ToCollection(this DataTable table, Dictionary dic){ List lst = new...


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

16 Aug 2011
Damian Flynn
Here's a couple of gems...From IList to DataTable.From DataTable to array of T.// DataTable: from IListpublic static DataTable ToDataTable(this IList iList){ DataTable dataTable = new DataTable(); PropertyDescriptorCollection propertyDescriptorCollection = ...
12 Jun 2011
2 alternatives  
This is an example to Convert from a datatable to a specific type of collection using Generic


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Vano Maisuradze
Georgia Georgia
No Biography provided

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.180318.3 | Last Updated 13 Aug 2011
Article Copyright 2011 by Vano Maisuradze
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid