Answers for "c# catch multiple exceptions at once"

C#
0

c# catch multiple exceptions at once

catch (Exception ex)            
{                
    if (ex is FormatException or OverflowException) // Chain as many or xException as you need
    {
        WebId = Guid.Empty;
        return;
    }
    
    throw;
}
Posted by: Guest on July-01-2021

Code answers related to "c# catch multiple exceptions at once"

C# Answers by Framework

Browse Popular Code Answers by Language