I have an application that calculates your gold per minute farmed. I want to make an error report that wouldn\'t allow you to insert any text in the console input where yous hou
In console application you can't control text input (no keypressed event to handle).
This could be a solution
Console.WriteLine("Inesrt your gold: ");
int gold;
while(!int.TryParse(Console.ReadLine(),out gold)){
Console.WriteLine("Please provide a valid gold value");
}
Console.WriteLine("Your gold is : " + gold);