title: Creating a generic array at runtime
body: <p>Is there a way in c# to do something like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public void Foo&lt;T&gt;()
  {
      T[] arr = Goo() as T[];
  }
  </code></pre>
  
  <p>Where Goo returns an <code>object[]</code>, Using reflection or whatever?</p>