title: Create a class with array of objects
body: <p>Code below defines a ChargeCustomer class that contains an array of type "customers". I want to be able to create an object with either 1 "customer" or 2 "customers" based on the constructor parameters. Is this the right way to do so in C#:</p>
  
  <pre><code>public class ChargeCustomer 
  {
      private Customer[] customers;
  
      public ChargeCustomer( string aName, string bName, int charge )
      {
          customers = new Customer[2];
          customers[0] = new Customer(aName, charge);
          customers[1] = new Customer(bName, charge);  
      }
  
      public ChargeCustomer( string bName, int charge )
      {
          customers = new Customer[1];
          customers[0] = new Customer( bName, charge );
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks!</p>