How to group consecutive similar items of a collection?
- by CannibalSmith
Consider the following collection.
True
False
False
False
True
True
False
False
I want to display it in a structured way, say, in a TreeView. I want to be able to draw borders around entire groups and such.
True Group
True
False Group
False
False
False
True Group
True
True
False Group
False
False
How do I accomplish this with as little procedural code as possible?