I have been learning the basics of C# with a Console Application. I was wondering if anyone knew how to use an IF statement with a String instead of an integer. It's a bit annoying and I need it so I can compare a value the user has outputted to the console. This is because the Console.ReadLine(); only likes Strings and not Integers. Below is my code:
string num = Console.ReadLine();
if (num == 9)
{
Console.WriteLine("Ooh my number is 9");
}
Any help is appreciated!