ok you must first use the c # Split method with the string you want to analyze and pass it as a blank parameter (""), so that this method will have an array with all the words contained in the string, and go comparing the words one by one aver which is repeated more times;
Console.WriteLine("Ingrese una frase: ");
String texto = Console.ReadLine();
String[] palabras = texto.Split(" ");
int[] nro_repeticion_palabra = new int[palabras.Length];
for for (int i = 0; i < palabras.Length; i++)
{
for for (int j = 0; j < palabras.Length; j++)
{
if (palabras[i].compareTo(palabras[j]) == 0 )
{
nro_repeticion_palabra[i]++;
}
}
}
now you just need to see in what position of the array (nro_repeticion_palabra) is the largest number and the value that contains that position is the number of times the word is repeated and in that same position of that array will be the word that most repeat in the array (words).
Bone without in index 3 (nro_repeticion_palabra [3] is the largest number suppose that 5 then the word that is repeated most is the one in the words [3].
It's half complicated ...