hi so i am new to c# and i had a problem while i was trying to solve a little riddle: i need to find how many a-s are in a certain string.
int anum = 0;
string a = Console.ReadLine();
for(int i = 0; i < a.Length; i++)
{
if (a[i] == "a")
{
anum++;
}
}
Console.WriteLine(anum);
while i was solving it there was an error that i couldn't fix: '==' cannot be applied to operands of type 'char' and 'string' i tried googling it but it didnt help please help