title: new classes in for loop
body: <p>Currently I have the following code:</p>
  
  <pre><code>        DecisionVariable[] attributes = 
          {
              new DecisionVariable("Var1", 2),
              new DecisionVariable("Var2", 4),
              new DecisionVariable("Var3", 1),
              new DecisionVariable("Var4", 2),
              new DecisionVariable("Var5", 5),
          };
  </code></pre>
  
  <p>but I would like to create them using a For loop:</p>
  
  <pre><code>        DecisionVariable[] attributes = 
          {
              for (int i=0;i&lt;49;i++)
              {
                  new DecisionVariable ("Var" + i, iValues[i]);
              }
          };
  </code></pre>
  
  <p>In the second version C# tells me that "For" has an invalid expression.</p>
  
  <p>Do I have a typo somewhere or is something like that generally not allowed, using a for loop in a constructor?</p>