You can get the values from a named column in the
Steps:
DataTable using a single line of code in LINQ.Steps:
- Convert the
DataTableobject toEnumerable(). - Apply the
selectclause with the column name as field name. - Cast it to a
stringarray.string[] strSummCities = dtTemp1.AsEnumerable().Select(s => s.Field<string>("City")).ToArray<string>();
Comments
Post a Comment