© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
18 replies
BenMcLean

❔ Return groups of results using LINQ?

I'm iterating through a set of data with LINQ.
The data's broken up into sections, where there's a "1" in the "NewSection" column on the first row of a new section, otherwise there's a "0" in that column.
I want to make a function that returns an Enumerable of Enumerables of my data rows, where the inner enumerable is all the entries in each section.
How would I construct my loop for this?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅Shuffling db results using LINQ.
C#CC# / help
2y ago
❔ Put results of LINQ query into collection
C#CC# / help
3y ago
Performance of Linq
C#CC# / help
2mo ago
Build ref return with System.Linq.Expressions
C#CC# / help
4y ago