title: Create an anonymous type dynamically
body: <p>I am able to creaate a <code>dynamic</code> <code>type</code> at <code>edittime</code></p>
  <pre><code>var orderFields = new
                  {
                      legs = new[] {
                          new { 
                               instrumenttype = &quot;Equity Option&quot;, 
                               symbol = &quot;SPY   221021C00422000&quot;,
                               quantity = &quot;1&quot;,
                               action = &quot;Buy to Open&quot;
                          },
                          new {
                               instrumenttype = &quot;Equity Option&quot;,
                               symbol = &quot;SPY   221021C00420000&quot;,
                               quantity = &quot;1&quot;,
                               action = &quot;Sell to Open&quot;
                          },
                      }
                  };
  </code></pre>
  <p>However, I don't know how many of these there will be at <code>runtime</code>:</p>
  <pre><code>new { 
           instrumenttype = &quot;Equity Option&quot;, 
           symbol = &quot;SPY   221021C00422000&quot;,
           quantity = &quot;1&quot;,
           action = &quot;Buy to Open&quot;
      },
  </code></pre>
  <p>The source of the instances could be a <code>List&lt;DataRow&gt;</code>, or <code>List&lt;Struct&gt;</code></p>
  <p>I am able to do this at <code>edittime</code> ok, but don't know how to fill in the rest at runtime:</p>
  <pre><code>var orderFields = new
                  {
                      
                  };
  </code></pre>
  <p>How do I create an <code>anonymous</code> <code>type</code> at <code>runtime</code> and add these to the <code>legs []</code>?</p>