2 try catch in a method C# code example
Example: c# try catch multiple catches
try
{
Console.WriteLine("Chose a number: ");
int usrNo = Convert.ToInt32(Console.ReadLine());
return usrNo;
}
catch (FormatException ex)
{
ErrorMessagePrintCustomMessage("You pressed a letter");
}
catch (Exception ex) { ErrorMessageErrorOccured(ex); }