title: LINQ building array with multiple values per select
body: <p>I have been trying to build a YAML Node with the yamlserializer library. But I am having difficulty constructing a LINQ statement.</p>
  
  <p>I have a list of "Category" objects, lets call it "Cats", the Category class has both an Id and a Name that need to be represented in the following way as Yaml Mappings.
  Cats[0].Id : Cats[0]Name
  Cats[1].Id : Cats[1].Name
  ...</p>
  
  <p>For those that haven't worked with the library.
  the class YamlMapping has a constructor that takes an array of YamlNode objects.
  YamlNode is an abstract class from which all types of nodes including YamlMapping inherit.</p>
  
  <pre><code>new YamlMapping
  (
      "Categories", new YamlMapping (
      (from cat in blacklist.Categories.List select
      (YamlNode)cat.Id AND (YamlNode)cat.Name).ToArray());
  )
  </code></pre>
  
  <p>The above obviously does not work, and I was wondering if there is any way to achieve the desired result.
  It would be possible to construct the arrays before hand but was wondering if there is a more LINQish (?) way of achieving the same effect.</p>
  
  <p>In other words the array build would have to be something like this.</p>
  
  <pre><code>YamlNode[] arr;
  arr[0] = Cats[0].Id
  arr[1] = Cats[0].Name;
  arr[2] = Cats[1].Id;
  arr[3] = Cats[1].Name;
  ......
  </code></pre>