I have DataTable.
DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn(\"id\", Type.GetType(\"System.Int32\"))); dt.Columns.Add(new DataColumn(\"name\"
List ids = dt.AsEnumerable().Select(r => r.Field("id")).ToList();
OR
int[] ids = dt.AsEnumerable().Select(r => r.Field("id")).ToArray();