1. why not test to see if the user inputs a number ... defensive programming ! see the use of In32.TryParse in this example.
2. why not limit the number of tries the user can have to avoid endless looping ?
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int agevalue;
int ntries = 2;
int tries = 1;
while (true)
{
Console.WriteLine($"try: #{tries} | Input your age please: ");
var age = Console.ReadLine();
if (Int32.TryParse(age, out agevalue))
{
Console.WriteLine("Is this right?(Y/N): " + agevalue);
if (Console.ReadKey().Key == ConsoleKey.Y) break;
Console.Clear();
}
if (++tries > ntries) break;
}
}
}
}
Another useful thing to add would be checking to see if the age entered is within a certain range that makes sense in the context of your app.