title: can't use type stored in a type array
body: <p>I have a base class called a, and it has a virtual function called Foo</p>
  
  <pre><code>class a
  {
      public virtual void Foo() {}
  }
  </code></pre>
  
  <p>And i have a bunch of other classes inheriting from it.</p>
  
  <pre><code>class B : A{}
  class C : A{}
  class D : A{}
  class E : A{}
  </code></pre>
  
  <p>Now, i want to have an array of the types so i can choose one by random so i tried this:</p>
  
  <pre><code>class Boo
  {
      Type[] options;
      public Boo()
      {
          options = new[]
          {
              typeof(B),
              typeof(C),
              typeof(D),
              typeof(E)
          };
      }
  }
  </code></pre>
  
  <p>And then i want to choose one at random and use its Foo method and i did it like this:</p>
  
  <pre><code>Random rnd = new Random();
  (options[rnd.Next(options.Length)] as A).Foo()
  </code></pre>
  
  <p>But this doesn't work, is there any way of accomplishing this?</p>
  
  <p>(Btw, i didn't have a good name for this so if anyone has a better name they can feel free to edit :) )</p>