multiple catch blocks c# code example
Example: c# multiple catch exceptions
// if C# v6+, you can use exception filters
catch (Exception ex) when (ex is FormatException || ex is OverflowException)
{
// do something
}
// if C# v6+, you can use exception filters
catch (Exception ex) when (ex is FormatException || ex is OverflowException)
{
// do something
}