Duplicate code to the max

Oare de ce ai scrie cod asa:

catch (ArgumentNullException ex)
   {
    result = string.Format("exception is: {0}", ex.Message);
    }
    catch (InvalidOperationException ex)
    {
    result = string.Format("exception is: {0}", ex.Message);
   }
    catch (SmtpFailedRecipientException ex)
    {
    result = string.Format("exception is: {0}", ex.Message);
    }
    catch (Exception ex)
    {
   result = string.Format("exception is: {0}", ex.Message);
   }

Leave a Reply

Your email address will not be published. Required fields are marked *