✅ while loops
while loops keep repeating the same over and over without waiting for the user to respond to the anyone know how to solve this?
Console.WriteLine(""); String a = Console.ReadLine();$codegif in chat$code into chat to learn how to post code.ReadLine outside of the while loop, so you definitely didn'tstring.IsNullOrEmpty or string.IsNullOrWhitespace over someString == ""$codeReadLinestring.IsNullOrEmptystring.IsNullOrWhitespacesomeString == ""Console.WriteLine("enter your name");
String name = Console.ReadLine();
while (name == "")
{
Console.WriteLine("Please enter a name");
}do {
// your code here to get the name
} while (name is invalid)