What’s the best way to refactor a method that has too many (6+) parameters?
I’m going to assume you mean C#. Some of these things apply to other languages, too. You have several options: switch from constructor to property setters. This can make code more readable, because it’s obvious to the reader which value corresponds to which parameters. Object Initializer syntax makes this look nice. It’s also simple to … Read more