I have this code here:
string code1 = null;
Console.Write("Username: " + Environment.UserName.ToString() + ">");
if (Console.ReadLine() == "info")
{
Console.WriteLine("Info:");
}
else if (Console.ReadLine() == "Set Code")
{
if (code1 == null)
{
Console.Write("TEST");
}
else
{
Console.WriteLine("'Set Code' is not known as a command \nEnter 'info' to view all commands");
Console.Write("Username: " + Environment.UserName.ToString() + ">");
}
}
else
{
string temp = Console.ReadLine();
Console.WriteLine("'" + temp + "' is not known as a command \nEnter 'info' to view all commands");
}
Console.ReadLine();
When I type in "Set Code" it does nothing, and then when I type in something like info, it goes to string temp = Console.ReadLine();
but then it does not run Console.WriteLine("'" + temp + "' is not known as a command \nEnter 'info' to view all commands");
Why does it not run anything else when I put in that code? I debugged it step by step, and it just like breaks there.