I am trying to use OR condition in C# in WHILE loop, but it doesn't work :( if I do separate conditions without OR conditions then it works!
it works like this:
while (myAnswer.ToLower() != "yes")
{
Console.Write("Please write YES or NO!: ");
myAnswer = Console.ReadLine();
}
but if I try to add additional conditions, doesnt metter its AND or OR, it sends me to infinite loop. For example this doesnt work:
while ((myAnswer.ToLower() != "yes") || (myAnswer.ToLower() != "no"))
{
Console.Write("Please write YES or NO!: ");
myAnswer = Console.ReadLine();
}
any ideas?