I am new with linq, I need to split an IEnumerable of a type Couple(string text, bool indicator) to multiple IEnumerables based on the indicator, I tried with skipWhile and TakeWhile but I didn't find a solution, the input is as follows:
Couple("a",false)
Couple("b",false)
Couple("c",true),
Couple("d",false)
Couple("e",false)
Couple("f",true),
Couple("g",true),
Couple("h",true),
Couple("i",false)
Couple("j",true),
Couple("k",true),
Couple("l",false)
Couple("m",false)
The result should be 7 IEnumerables
list1: Couple("a",false)
Couple("b",false)
list2: Couple("c",true)
list3: Couple("d",false)
Couple("e",false)
list4: Couple("f",true)
Couple("g",true)
Couple("h",true)
list5: Couple("i",false)
list6: Couple("j",true)
Couple("k",true)
list7: Couple("l",false)
Couple("m",false)
Any help please?