i am writing the following linq code in c#
var groupedData = from b in dt.AsEnumerable()
group b by b.Field<string>("TypeColor") into g
select new
{
Key = g.Key,
Value = g.Select(r => r.Field<int>("Price")),
Price = g.Select(r => r.Field<int>("Price"))
};
foreach (var g in groupedData)
{
string s = g.Key;
}
how can i select two or more field from the datatable and group the table with one field. Can any body help me? Here dt is a datatable which is binding from database