3 Replies Latest reply: Sep 17, 2006 11:50 AM by 807569 RSS

    creating constructors which take changing amounts of arguments.

      as the subject states, i was wondering how to write a constructor which can take in a varying number of arguments for example

      public class average
      public int average;
      public average( // Varying numbers of args could be any amount)
      public string total = totalargs.length(); // Not a real method but hopefully you get the idea.
      average = (args1 + args2 + args3 + args4 + argsn.....) / total


      Could someone tell me how to do this?