Hi, this i'm trying to make a loop that would read a list of character (including numbers) that you type in terminated by a period and that would only write the letters and ignore the other characters. How would i do this?? Thats the code ive been doing but there seem to be a problem with != operator saying it can't work with a string or int.
For example: 345u435hu43i$$$@@@.
would only show: uhui
using System;
class text
{
static void Main()
{
Console.WriteLine("Enter text");
string line = Console.In.ReadLine();
string text = Convert.ToString(line);
int i = 0;
while (text != .)
{
line = Console.In.ReadLine();
text = Convert.ToString(line);
}
Console.WriteLine("The letters are {0}", text);
Console.In.Read();
return;
}
}