private Result GetResult() { Result result = new Result(); try{ ExternalDependency service = new ExternalDependency(); service.DoWork(); result.Successful = true; }catch(IndexOutOfRangeException e) { Console.WriteLine("Error occured: {0}", e.Message); result.Successful = false; } return result; }
private Result GetResult() { Result result = new Result(); ExternalDependency service = new ExternalDependency(); try { service.DoWork(); result.Successful = true; } catch { result.Successful =false; } return result; }
private Result GetResult() { Result result = new Result(); ExternalDependency service = new ExternalDependency(); try { service.DoWork(); result.Successful = true; } catch { result.Successful = false; } return(result); }