title: Invalid expression term '{' (Declaring array outside switch statement)
body: <p>I've started an algorithm for a program, and I've declared the array in method itself. However, when I reference the array inside the switch statement I get repetitive errors: Invalid expression term '{' and '{' expected and ';' expected
  Below is the code:</p>
  
  <pre><code>algorithm()
  {
  code .....
  int[] interval;
  more code....
  switch (int.parse(lbl2.text))
      {
      case 1:
          sInterval = {10, 20, 30, 40};
          break;
      case 2:
          sInterval = { 50, 60, 70, 80};
          break;
      }
  }
  </code></pre>
  
  <p>How do you fix this problem?</p>