title: Setting the SelectedIndex on ComboBox
body: <p>I am in a beginning C# class and I am having trouble figuring out why after the following code runs, the selected index is still -1 (i.e. the combobox at load is empty). It should be defaulting to selectedIndex = 1:</p>
  
  <pre><code>public string[,] GetArray()
      {
          //create array with conversion values
          string[,] conversionInfo = { {"Miles","Kilometers", "1.6093"},
                                       {"Kilometers","Miles", ".6214"},
                                       {"Feet","Meters", ".3048"},
                                       {"Meters","Feet","3.2808"},
                                       {"Inches","Centimeters", "2.54"},
                                       {"Centimeters","Inches",".3937"}};
          return conversionInfo;
      }
  
      private void Form_Load(object sender, EventArgs e)
      {
          //get array to use
          string[,] conversionChoices = GetArray();
  
          //load conversion combo box with values
          StringBuilder fillString = new StringBuilder();
  
          for (int i = 0; i &lt; conversionChoices.GetLength(0); i++)
          {
              for (int j = 0; j &lt; conversionChoices.GetLength(1) - 1; j++)
              {
                  fillString.Append(conversionChoices[i, j]);
  
                  if (j == 0)
                  {
                      fillString.Append(" to ");
                  }
              }
              cboConversion.Items.Add(fillString);
              fillString.Clear();
          }
  
          //set default selected value for combobox
          cboConversion.SelectedIndex = 0;
  
      }
  
      public void cboConversions_SelectedIndexChanged(object sender, EventArgs e)
      {
          LabelSet(cboConversion.SelectedIndex);
      }
  
      public void LabelSet(int selection)
      {
  
          //get array to use
          string[,] labelChoices = GetArray();
  
          //set labels to coorespond with selection
          string from = labelChoices[selection, 0];
          string to = labelChoices[selection, 1];
          lblFrom.Text = from + ":";
          lblTo.Text = to + ":";
      }
  </code></pre>
  
  <p>This is a class assignment so I am not allowed to set anything using the designer, other than to link methods to event. Everything works correctly except for the default for the combobox.</p>