title: How can I add array values into a combobox?
body: <p>I have defined variables as <code>string</code> arrays. I also have a form called <code>form4</code> and on this form I have 1 textbox and 1 combobox.</p>
  
  <p>I have this code in a class:</p>
  
  <pre><code>public class food
  {
      public string[] name1 = new string [20];
      public string[] name2 = new string [50];
      public string[] name3 = new string [40] ;
      public string[] name = new string [20];
      public string[] type = new string [15];
      //private const int total = 11;
      public int[] calories_ref;
      public int i, i2;
      public Form4 form = new Form4();
  
  
      public food(string[] Name1, string[] Name, string[] Type1, int[] kcal)
      {
          name1 = Name1;
          name = Name;
          type = Type1;
          calories_ref = kcal;
      }
      public food()
      {
  
      }
      private void settypes()
      {
  
          type[0] = "Bebidas não alcoólicas";
          type[1] = "Bebidas Alcóolicas";
          type[2] = "Fruta";
          type[3] = "Hidratos de Carbono";
          type[4] = "Peixe";
          type[5] = "Carne";
          type[6] = "Cereais";
          type[7] = "Lacticínios";
          type[8] = "Óleos/Gorduras";
          type[9] = "Leguminosas";
          type[10] = "Legumes";
  
          for (int i = 0; i &lt; type.Length; i++)
          {
              form.comboBox1.Items.Add(type[i]);
          }
      }
  </code></pre>
  
  <p>In the <code>settypes()</code> method I define the various types of food, more concretly the food wheel. How can I can use these values as items in the combobox that is in <code>form4</code>?</p>