Here are some ideas.
First, the C # convention for publicly available methods is to use them: "KillZombie", not "killZombie".
You can do this one way if you want. It uses a method that accepts one or more locations. The caller can simply provide a list: KillZombies(location1, location2, location3) ;
private void KillOneZombie(string location) { ... } public void KillZombies(string location, params string[] additionalLocations) { KillOneZombie(location); if (additionalLocations == null) return; foreach(string additionalLocation in additionalLocations) KillOneZombie(additionalLocation); }
If you want to have two methods, consider making one of them accept an IEnumerable<string> instead of an array; in this way, the caller can pass to the list, request, array, whatever.
Your second naming pattern is more standard: KillZombie and KillZombies.
The params variable is the most important, so including it as the last argument to make params work seems rather awkward. Is my concern about putting the most important argument last, legitimate enough to split the methods into KillZombie and KillZombies, or is parameters still the right way to do something?
I would think about how you expect the method to be used. Consider, for example:
Console.WriteLine("User: {0} Score: {1}", user[i].Name, scores[i]);
Here we explicitly expect that "params" will be used to support a variable number of arguments in the caller. No one ever does this:
object[] results = new object[] { user[i].Name, scores[i] }; Console.WriteLine("User: {0} Score: {1}", results);
although this is completely legal. If you expect your method to be used as Console.WriteLine, where a variable number of parameters will be passed, but the number of parameters is known at compile time, then use the parameters.
If you expect it to be used with the second template - someone has an array of locations - then do not use params; make two methods: KillZombie and KillZombies, and one of them will take IEnumerable from the strings.