Answers for "c# try catch couple of exceptions with the same code"

C#
0

c# catch two exceptions in one block

catch (Exception ex)            
{                
    if (ex is FormatException || ex is OverflowException)
    {
        WebId = Guid.Empty;
        return;
    }

    throw;
}
Posted by: Guest on January-23-2020

C# Answers by Framework

Browse Popular Code Answers by Language