Hi
How to loop thru groupeditems
var groupedItems = objGroup.GroupBy(g => g.GroupName.Split('(')[0].Trim())
.Select(g => string.Join(" , ", g.Select(item => item.GroupName)));
Thanks
Hi
How to loop thru groupeditems
var groupedItems = objGroup.GroupBy(g => g.GroupName.Split('(')[0].Trim())
.Select(g => string.Join(" , ", g.Select(item => item.GroupName)));
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Jun 13, 2023, 11:13 AM
Brahma Prakash ShuklaPosted Jun 23, 2023, 5:54 AM
var groupedItems = objGroup.GroupBy(g => g.GroupName.Split('(')[0].Trim())
.Select(g => string.Join(" , ", g.Select(item => item.GroupName)));
foreach (var group in groupedItems)
{
Console.WriteLine(group);
// Perform any operations or logic on each group
}