Currently, I\'m using:
DataTable dt = CreateDataTableInSomeWay();
List list = new List();
foreach (DataRow dr in dt.Rows)
{
To assign the DataTable rows to the generic List of class
List temp = new List();//List that holds the Candidate Class,
//Note:The Candidate class contains RollNo,Name and Department
//tb is DataTable
temp = (from DataRow dr in tb.Rows
select new Candidate()
{
RollNO = Convert.ToInt32(dr["RollNO"]),
Name = dr["Name"].ToString(),
Department = dr["Department"].ToString(),
}).ToList();