title: Creating Array Type at runtime
body: <p>I want to get 'array type' of a type at run time. I do not need the instance of the array, just Type. I currently use the below method.</p>
  
  <pre><code>    private Type GetArrayType(Type elementType)
      {
          return Array.CreateInstance(elementType, 0).GetType();
      }
  </code></pre>
  
  <p>Is there any better solution without creating the instance of the array?</p>
  
  <p>Note: I cannot use <code>Type.GetType(elementType.FullName + "[]")</code> because I create the element Type at runtime by <code>Reflection.Emit</code>. According to <a href="http://msdn.microsoft.com/en-us/library/w3f99sx1.aspx" rel="nofollow">MSDN</a> it requires dynamic assembly to be saved on disk which I do not want to do.</p>