title: Setting value of array using combobox selected index
body: <p>I'm trying to set up an empty array first and then trying to set the value of the array depending on the selected index of the combobox. The code will make more sense</p>
  
  <pre><code>        double[] xValues = {};
  
          private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
          {
              if (comboBox1.SelectedIndex == 0)
              {
                  double[] xValues = { 1, 2, 3, 4, 5 };
                  return xValues;
              }
              else if (comboBox1.SelectedIndex == 1)
              {
                  double[] xValues = { 6, 7, 8, 9, 10 };
                  return xValues;
              }
              else if (comboBox1.SelectedIndex == 2)
              {
                  double[] xValues = { 11, 12, 13, 14, 15 };
                  return xValues;
              }
          } 
  </code></pre>
  
  <p>But on the error console I'm getting three errors:</p>
  
  <blockquote>
    <p>Error  1   Since 'StepTestOne.Form1.comboBox1_SelectedValueChanged(object, System.EventArgs)' returns void, a return keyword must not be followed by an object expression`</p>
  </blockquote>
  
  <p>Any ideas what I'm doing wrong?</p>