I'm stuck. I have song text stored in a string. I need to count the song houses (houses separates by empty line. empty line is my delimiter). In addition I need an access to each word, so i can associate the word to its house. I really will appreciate yours help
This is my base code:
var paragraphMarker = Environment.NewLine;
var paragraphs = fileText.Split(new[] {paragraphMarker},
StringSplitOptions.RemoveEmptyEntries);
foreach (var paragraph in paragraphs)
{
var words = paragraph.Split(new[] {' '},
StringSplitOptions.RemoveEmptyEntries)
.Select(w => w.Trim());
//do something
}