[Solved] Convert string to char error message [closed]


Console.ReadLine gives you a string

a string is, among other things, a collection of chars

try this

string number = "";
int numb = 0;

Console.WriteLine("Please enter the telephone number...");
number = Console.ReadLine();

for(int i=0; i<number.Count; i++)
{
    if (number[i] == 'A')
    {
        //...
    }
}

solved Convert string to char error message [closed]