Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# multiple catch exceptions

// if C# v6+, you can use exception filters
catch (Exception ex) when (ex is FormatException || ex is OverflowException)
{
  // do something
}
Source by csharp.today #
 
PREVIOUS NEXT
Tagged: #multiple #catch #exceptions
ADD COMMENT
Topic
Name
3+8 =