How do I write a function that can accept unlimited number of parameters?
What am trying to do is create a function within a class that wraps the following:
At 5 parameters, this design is starting to exhibit the AntiPattern "Too Many Parameters". This suggests the refactoring called Parameter Object, an object or structure with data members representing the arguments to be passed in. However, avoid making it a Magic Container.
See also Introduce Parameter Object refactoring at refactoring.com.