Create a GroupAdjacent
extension, such as the one listed here.
And then it’s as simple as:
var groups = myData.GroupAdjacent(data => data.OnOffStatus);
More Related Contents:
- linq syntax: What is the type that this returns? How can I now go ahead and use firstRow.ingredientName etc?
- Retrieving Property name from lambda expression
- Return anonymous type results?
- How do I specify the Linq OrderBy argument dynamically? [duplicate]
- When to use BlockingCollection and when ConcurrentBag instead of List?
- How to get the index of an element in an IEnumerable?
- Entity framework left join
- How to check if IEnumerable is null or empty?
- Find index of a value in an array
- How do you add an index field to Linq results
- Local sequence cannot be used in LINQ to SQL implementation of query operators except the Contains() operator
- Entity Framework. Delete all rows in table
- Find() vs. Where().FirstOrDefault()
- How to Get XML Node from XDocument
- Filter a list by another list C#
- Easiest way to Rotate a List in c#
- Find substring in a list of strings
- Linq to Entity Join table with multiple OR conditions
- LINQ .Any VS .Exists – What’s the difference?
- LINQ Expression to return Property value?
- Simulating Cross Context Joins–LINQ/C#
- Remove duplicate items from list in C#, according to one of their properties
- Entity Framework core – Contains is case sensitive or case insensitive?
- How to do an “in” query in entity framework?
- LINQ: Add RowNumber Column
- Is there an easy way to merge two ordered sequences using LINQ?
- How to include() nested child entity in linq
- Linq OrderBy against specific values
- What is the best way to check two List lists for equality in C#
- LINQ query — Data aggregation (group adjacent)