Converts a DataTable into a typed List.
public static List<T> DataTableToList<T>(this System.Data.DataTable table) where T : class, new()
Source table to convert to a List of type T.
DataTable dt = new DataTable();... // Fill dt with SQL or other data.var myList = dt.DataTableToList<MyType>();