title: What is a WhereSelectArrayIterator in Linq?
body: <p>I have an array of strings.  I'm trying to write them to an element.  When I create a new element it works as it's supposed to, when i try to SetElementValue it doesnt. Any help would be appreciated.  I don't even know what to look up.</p>
  
  <p>Working Properly:</p>
  
  <pre><code>new XElement("tags", blog.tags.Select(x =&gt;
      new XElement("tag", PageUtilities.AddCDATAElements(PageUtilities.SanitizeXmlString(x)))))
  </code></pre>
  
  <p>Result in Xml File:</p>
  
  <pre><code>&lt;tags&gt;
    &lt;tag&gt;&amp;lt;![CDATA[tag1]]&amp;gt;&lt;/tag&gt;
    &lt;tag&gt;&amp;lt;![CDATA[tag2]]&amp;gt;&lt;/tag&gt;
    &lt;tag&gt;&amp;lt;![CDATA[tag3]]&amp;gt;&lt;/tag&gt;
    &lt;tag&gt;&amp;lt;![CDATA[tag4]]&amp;gt;&lt;/tag&gt;
  &lt;/tags&gt;
  </code></pre>
  
  <p>The problem comes in when i try to update:</p>
  
  <p>Not Working:</p>
  
  <pre><code>xBlog.SetElementValue("tags", blog.tags.Select(x =&gt;
      new XElement("tag", PageUtilities.AddCDATAElements(PageUtilities.SanitizeXmlString(x)))));
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>&lt;tags&gt;System.Linq.Enumerable+WhereSelectArrayIterator`2[System.String,System.String]&lt;/tags&gt;
  </code></pre>
  
  <p>At a total loss.  Please help.  Thanks you guys!</p>
  
  <p>For Simplicity I tried it without the AddCDATAElements and SanitizeXMLString and still the exact same result</p>
  
  <p>xBlog.SetElementValue("tags", blog.tags.Select(x => new XElement("tag", x)));</p>
  
  <p>
  System.Linq.Enumerable+WhereSelectArrayIterator`2[System.String,System.String]
  </p>