Count words, and skip the spaces.
Hi, this something very basic I know it, but how can I skip the spaces in this basic program please.
string Palabras = string.Empty;
//int ContEspacios;
Console.WriteLine("Escribe una palabra:");
Palabras = Console.ReadLine();
foreach (var X in Palabras.Length.ToString())
{
Console.WriteLine("Cuantas palabras tiene {0}:",X);
}
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}