I\'m stuck on how to count how many words are in each sentence, an example of this is: string sentence = \"hello how are you. I am good. that\'s good.\" and ha
string sentence = \"hello how are you. I am good. that\'s good.\"
string text = "hello how are you. I am good. that's good."; string[] sentences = s.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries); IEnumerable wordsPerSentence = sentences.Select(s => s.Trim().Split(' ').Length);