Guest User

Untitled

a guest
Jun 22nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public void Foo(Fizz f, Buzz b) {
  2. if (null==f) throw new ArgumentNullException("f");
  3. if (null==b) throw new ArgumentNullException("b");
  4.  
  5. // Do stuff with f and b
  6. // Do stuff with f and b
  7. // Do stuff with f and b
  8. // Do stuff with f and b
  9. // Do stuff with f and b
  10. // Do stuff with f and b
  11. }
  12.  
  13. // vs
  14.  
  15. public void Foo(Fizz f, Buzz b) {
  16. if (null==f) throw new ArgumentNullException("f");
  17. if (null==b) throw new ArgumentNullException("b");
  18. FooDo(f, b);
  19. }
  20.  
  21. private void FooDo(Fizz f, Buzz b) {
  22. // Do stuff with f and b
  23. // Do stuff with f and b
  24. // Do stuff with f and b
  25. // Do stuff with f and b
  26. // Do stuff with f and b
  27. // Do stuff with f and b
  28. }
Add Comment
Please, Sign In to add comment