Click here to Skip to main content
15,886,032 members
Articles / Programming Languages / SQL

Tips for LINQ: Fill any generic List from a DataTable

Rate me:
Please Sign up or sign in to vote.
4.26/5 (10 votes)
3 Mar 2009CPOL2 min read 86K   496   41  
This article shows how to populate any generic list from a DataTable.

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FromDataTableToGenericListExample", "FromDataTableToGenericListExample.csproj", "{F9E6B53B-B30D-46E2-91A4-35848C54A52A}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{F9E6B53B-B30D-46E2-91A4-35848C54A52A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{F9E6B53B-B30D-46E2-91A4-35848C54A52A}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{F9E6B53B-B30D-46E2-91A4-35848C54A52A}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{F9E6B53B-B30D-46E2-91A4-35848C54A52A}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer
Spain Spain
I´ve been working with Oracle, Sql Server and Visual Basic 6 since 2003 and with C# since 2006. Now I´m fighting with Biztalk 2006 too...

MCTS - .NET Framework 4, Windows Applications
MCTS - Accessing Data with .NET Framework 4

Comments and Discussions