I need to write a function that will take a variable number of arguments. I read a little about params[], but I don’t think that will work in my case. My function needs to take a variable number of ints and then a corresponding bool value for each of them. I have to iterate through each of these combinations and input them into a database. Just looking for someone to point me in the right direction. Thanks.
Share
I would recommend building a struct and then passing those in as params. In my example, your struct represents a score of some kind:
Your method signature would then be:
Here’s an example of calling SaveScores: