List<string> list = new List<string>(project.Lists["list"]);
Dictionary<string, int> wordCounts = new Dictionary<string, int>();
foreach (string str in list){
string[] words = str.ToLower().Split(new[] { ' ', '.', ',', '!', '?' }, StringSplitOptions.RemoveEmptyEntries);
foreach (string word in words){
if (wordCounts.ContainsKey(word))
wordCounts[word]++;
else
wordCounts[word] = 1;
}
}
string mostFrequentWord = wordCounts.OrderByDescending(pair => pair.Value).First().Key;
return mostFrequentWord;