//Sort Distinct Words private void GetDistinctWords() { var distinctWords = ParagraphWordList.OrderBy(d => d).Select(d => d).Distinct(); foreach (var word in distinctWords) { DistinctWordList.Add(word); } }
//Count Occurences of Distinct Words private int GetDistinctWordCount(string word) { distinctWordCount = ParagraphWordList.Count(w => w == word); return(distinctWordCount); }