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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Apr 5, 2013, 8:23 AM
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