Home
Manage Your Code
Snippet: How to select data from a DataTabe in a DataSet with LINQ (C#)
Title: How to select data from a DataTabe in a DataSet with LINQ Language: C#
Description: Select and sort values from a TataTable and returns a OrderedEnumerableRowCollection. Views: 160
Author: Gerd Fromm Date Added: 10/29/2008
Copy Code  
1var result = from row in DataSet.DataTable
2                         where row.Surname == "Peter"
3                         orderby row.Name ascending
4                         select row;
Notes
Return value is a OrderedEnumerableRowCollection