C#C
C#14mo ago
heloo

Issue with code execution

static public int GetMain()
{
try
{
Console.Write("Choose A project Type 1-Backend 2-fronted 3-fullstack:");
int Choice = int.Parse(Console.ReadLine()!);

if (Choice >= 4)
{
throw new Exception();
}

return Choice;
}
catch (Exception e)
{
Console.WriteLine("Input Must Be Numbers Only!;");
GetMain();
}

}
Was this page helpful?