Hi all
I’m struggling with refactoring on Windows, the method Ben shows does not allow me to do it. I’ve looked at Ben’s code and compared to my own and i am unable to figure out what to do, it seem identical!
void OnUserInput(string input)
{
if (input == "menu")
{
ShowMainMenu();
}
else if (CurrentScreen == Screen.MainMenu)
{
if (input == "1")
{
level = 1;
StartGame();
}
else if (input == "2")
{
level = 2;
StartGame();
}
else if (input == "501")
{
Terminal.WriteLine("LARA!!");
}
else
{
Terminal.WriteLine("Please enter a valid selection");
}
}
}
Because the right click method doesn’t work, i go to edit - refactor - extract method and i get the following error.
Any help will be much appreciated!