Im working on HighLow Game. Im trying to create a method that will PlayAgain if User want to play again ,but i'm getting this Bug saying. no all code path return a value. when i click the debug button it says replace the PlayAgain with a property . when i click on the automatic debug it build only get on the bottom ,but still with another bug, i delete and write { get; set; } next to PlayAgain everyCode turn errors. please can anyone help
public static void Main(string[] args)
{
bool play = true;
while (play)
{
//Instatiate
HighLow.Play();
//Play Again?
play = PlayAgain();
}
Console.WriteLine("s");
}
public bool PlayAgain { get; set; }
private static bool PlayAgain()
{
//Ask user
HighLow.Footer();
Console.WriteLine("Would you like to play again?[Y/N]");
//Catch resp
string userchoice = Console.ReadLine().ToUpper();
//Condition
if (userchoice == "Y")
{
//clean
Console.Clear();
Main(null);
}
else
{
Console.WriteLine("Thanks for playing, have a great day!");
Environment.Exit(0);
}
}
}
}