User Input
Console.WriteLine("Enter number:");
if(int.TryParse(Console.ReadLine(),out int input))
{
// Input validated
Console.WriteLine($"You entered {input}");
}
Comments
Related
Console.WriteLine("Enter number:");
if(int.TryParse(Console.ReadLine(),out int input))
{
// Input validated
Console.WriteLine($"You entered {input}");
}