title: Use for loop when writing a XML file with LINQ
body: <p>I must save data to an XML file, the data is stored in 4 arrays and 2 int. I must use the same element from each array ( Ex <code>candTur1[0]</code> with <code>votTur1[0]</code>)</p>
  
  <p>I've tried using this code :</p>
  
  <pre><code>XDocument document = new XDocument(
     new XDeclaration("1.0", "utf-8", "yes"),
     new XElement("alegeri",
         new XElement("tur",
             new XElement("nrtur", 1),
             for (int i = 0; i &lt; candTur1.Length; i++)
             {
                 new XElement("candidat",
                 new XElement("nume", candTur1[i]),
                 new XElement("voturi",votTur1[i] ),
                 new XElement("procent",((votTur1[i] * 100) / votanti)) );
             };
           );
         );
      document.Save("People.xml");
  </code></pre>
  
  <p>All arrays have the same length and the XML should look like : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;alegeri&gt;
    &lt;tur&gt;
      &lt;nrtur&gt;1&lt;/nrtur&gt;
      &lt;alegatori&gt;2341&lt;/alegatori&gt;
      &lt;candidat&gt;
        &lt;nume&gt;Ion&lt;/nume&gt;
        &lt;voturi&gt;50&lt;/voturi&gt;
        &lt;procentaj&gt;50&lt;/procentaj&gt;
      &lt;/candidat&gt;
    &lt;/tur&gt;
    &lt;tur&gt;
      &lt;nrtur&gt;2&lt;/nrtur&gt;
      &lt;alegatori&gt;2341&lt;/alegatori&gt;
      &lt;candidat&gt;
        &lt;nume&gt;Ion&lt;/nume&gt;
        &lt;voturi&gt;50&lt;/voturi&gt;
        &lt;procentaj&gt;50&lt;/procentaj&gt;
      &lt;/candidat&gt;
    &lt;/tur&gt;
  &lt;/alegeri&gt;
  </code></pre>
  
  <p>Thanks!</p>