I want to find with LINQ each first row that has a different category than “cat1” and extract the category name and sum.
So to have as output “cat2”-20 and “cat3”-30. This output can be of any kind, dictionary,DT,etc.
(From d in dtData.AsEnumerable
Group d by k=d("Category").toString.Trim into grp=Group
Where Not k.Equals("cat1")
Select r = grp.First()).CopyToDataTable