Noob Question
I need the username and password to individually loop back on incorrect input. (P.S I started coding C# today and this is all free typed code from my brain and I am very proud so far. Can't seem to figure out the loop part though? Maybe 'While' command?)
(As you can see I attempted the 'While' command. You may disregard that or remove it if incorrect
.
Thank you
Code:
static void Main(string[] args)
{
//This is the login terminal
string userName, passWord;
//Message header
Console.WriteLine("Warning!");
Console.WriteLine("Using a single license on more than a single device will result in a HWID & IP Ban!");
//Username settings
Console.Write("Please Enter Username: ");
userName = Convert.ToString(Console.ReadLine());
if (userName == "Hayden")
while (userName != "Hayden")
{
Console.WriteLine("Thank you Hayden");
}
else
{
Console.WriteLine("I'm sowwy but that's incorrect :(");
}
//Password settings
Console.Write("Please Enter Password: ");
passWord = Convert.ToString(Console.ReadLine());
if (passWord == "Password")
{
Console.WriteLine("Thank you Senpai");
}
else
{
Console.WriteLine("IP Log Initiated. Incorrect Login.");
}
Console.Read();
.Thank you
