c# – How do you convert dataTable to generic list?


How do you convert datable to generic list in C#?

Many times i need to use an old webservice and it returns a datatable as result.I want to show you a simple way for converting this result in a generic list.

You just need use the datatable as “AsEnumerable” and map the fields that you want.

c# Convert Data Table

For more information you can check this link of  msdn forum

Leave a Reply

Your email address will not be published. Required fields are marked *