I'm trying to enter a special character, but the app still displays a message «Wrong password!» If anyone knows what my mistake is, I will be glad if you point it out. Thanks in advance.
Special character i use: ☺ (U+263A)
Console.WriteLine("Enter a password:");
var pass = Console.ReadLine();
var key = '\u263a'.ToString();
while (pass != key)
{
if (pass != key)
{
Console.WriteLine("Wrong password!");
pass = Console.ReadLine();
}
else
{
break;
}
}
Console.WriteLine("Info: test 123");
Console.ReadKey();