I'm having a basic problem with my school code here. The code needs to ask user input as a console program, but I need it to repeat the question when entered an empty field before proceeding. So far I've tried a lot of while-loops, !isStringNullorEmpty, string.lengths, tried to create a function that checks it and some if-statements. I can't get it to work on either one of these. The program proceeds to the end all of the time.
System.Console.Write("Give first name");
String firstname = System.Console.ReadLine();
System.Console.Write("Give last name");
String lastname = System.Console.ReadLine();
System.Console.Write("Give date of birth");
DateTime = dt = DateTime.Parse(System.Console.ReadLine();