Skip to content
loading...

re: LINQ SelectMany in Depth VIEW POST

FULL DISCUSSION
 

If I understand your final index example should look like

books.SelectMany(
   (b, i) => b.Characters[i]...)

Or we could replace the result collector.

books.SelectMany(
   (b, i) => $"{b.Characters[i]} ({b.Title})")
 

No, what I have there is correct and works properly.

 

I don't understand where characters comes from then. It looks undefined to me.

Imagine it as a List<string> that comes from another file or data source outside of books

code of conduct - report abuse