E
Edward
Say I have an array of poems and I want to get all words in these poems.
In the second lambda parameter I want to exclude those empty strings
created by the first lambda Split expression. But the compiler thinks
the second parameter is not of correct type.
How can I write the second lambda expression?
Code:
string[] poems = { "Birds are singing.", "Ducks are playing." };
var voc = poems.SelectMany
(poem => poem.Split(' ', '.'), (word) => word.Length > 0)
created by the first lambda Split expression. But the compiler thinks
the second parameter is not of correct type.
How can I write the second lambda expression?