public string ReturnRepeatElement(string str)
{
int i, j;
int maxcount = 0;
string[] strArray = new string[]{};
string _element=string.Empty;
strArray = str .Split(' ');
for ( i = 0; i < strArray.Length; i++)
{
int count = 0;
for ( j = 0; j < strArray.Length;j++ )
{
if (strArray[i] == strArray[j])
{
count++;
}
}
if (maxcount < count)
{
maxcount = count;
_element=strArray[i];
}
}
return _element;
}Enter String and find the more occurrence word?
