the program is showing system exception at "choice "Convert.ToInt32(Console.ReadLine());"
internal class Program
{
static void Main(string[] args)
{
Console.Write("Enter number:");
try
{
Convert.ToInt32(Console.ReadLine());
}
catch (FormatException exp)
{
Console.WriteLine(exp.Message);
}
Console.ReadKey();
}
}
Comments
Leave a comment