title: create fluent interface for adding elements to a list
body: <p>this is what I'm trying to achieve:</p>
  
  <pre><code>config.Name("Foo")
        .Elements(() =&gt; {
                           Element.Name("element1").Height(23);
                           Element.Name("element2").Height(31);
                        })
       .Foo(23);
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>  .Elements(e =&gt; {
                       e.Name("element1").Height(23);
                       e.Name("element2").Height(31);
                    })
    .Foo(3232);
  </code></pre>
  
  <p>this is what I have for the moment:</p>
  
  <pre><code>public class Config
  {
     private string name;
     private int foo;
     private IList&lt;Element&gt; elements = new List&lt;Element&gt;();
  
     public Config Name(string name)
     {
        this.name = name;
        return this;
     }
  
     public Config Foo(int x)
     {
         this.foo = x;
     }
  
     ... //add method for adding elements 
  
     class Element
     {
        public string Name { get; set; }
        public int Height { get; set; }
     }
  }
  </code></pre>
  
  <p>anybody knows how to do this ?</p>