code_junkie

Regarding Passing Many Parameters

Nov 12th, 2011
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public struct user
  2. {
  3. public string FirstName;
  4. public string LastName;
  5. public string zilionotherproperties;
  6. public bool SearchByLastNameOnly;
  7. }
  8. public user[] GetUserData(user usr)
  9. {
  10. //search for users using passed data and return an array of users.
  11. }
  12.  
  13. Array FireEmployee(string first, string middle, string last, int id) {...}
  14.  
  15. Array FireEmployees(Employee[] unionWorkers) {...}
  16.  
  17. struct user
  18. {
  19. public user(string Username, string LastName)
  20. {
  21. _username = Username;
  22. }
  23. private string _username;
  24. public string UserName {
  25. get { return _username; }
  26. }
  27.  
  28. FireEmployee(
  29. first: "Frank",
  30. middle: "",
  31. last: "Krueger",
  32. id: 338);
Add Comment
Please, Sign In to add comment