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.
characters
Imagine it as a List<string> that comes from another file or data source outside of books
List<string>
books
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If I understand your final index example should look like
Or we could replace the result collector.
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 ofbooks