Input should be of any string .. For example, "A peacock is a bird"
Output Should display as..
a - 2,
peacock - 1,
is - 1,
bird - 1
Can anyone please help me out in code(C#) or some idea?
public void CountIndividualWords()
{
string strInput = "A peacock is a bird";
string[] strWord = strInput.ToString().ToLower().Split(' ');
for (int i = 0; i < strWord.Length; i++)
{
}
}
Thanks in advance,