In textbox text some content will be given, and check the word count the how many time of word will be repeater count and show .
Image in below
output come to this image
reply soon plz
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Apr 5, 2013, 4:23 AM EDT
correct me to understand your question
text box is multi line and you want to repeater count of words right?
here I tried to solved
string dummy = "search cricket sports search news search";
var alldummystrings = dummy.Split(new char[] { ' ' });
var stringwithcount = from d in alldummystrings
group d by d into grp
select new { value = grp.Key, count = grp.Count() };
foreach (var data in stringwithcount)
{
Console.WriteLine(data.value + " -- " + data.count);
}
just replace ' ' with in split function in above code with new line character.
hope this will help you