Skip to content

Instantly share code, notes, and snippets.

@darylf
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darylf/fe919ec783d8d2684250 to your computer and use it in GitHub Desktop.
Save darylf/fe919ec783d8d2684250 to your computer and use it in GitHub Desktop.
// Refactor the below code.
try
{
abc = !String.IsNullOrEmpty(wsResponse.Webservice.AbcValue) ? Convert.ToInt32(wsResponse.Webservice.AbcValue) : 0;
}
catch (Exception ex)
{
//throw it out and it will be handled by the caller
throw ex;
}
@darylf
Copy link
Author

darylf commented Nov 4, 2014

Note: The try/catch is unnecessary if it's not actually handling the exception!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment