title: foreach in a list [C#]
body: <pre><code>MonoBehavior[] list; // This is from Unity3d but think of it as Object, 
                       // all classes inherit from it.
  </code></pre>
  
  <p>The list is filled with lots of things, some are Alpha, from the class Alpha, and others are from other classes. </p>
  
  <pre><code>foreach(Alpha a in list) // Alpha is a script. 
    a.doSomething();
  </code></pre>
  
  <p>I was under the assumption that my foreach would work this way: Foreach Alpha script found in list do something, ignore every other component.</p>
  
  <p>This is a casting problem, I think. Please help me understand casting/polymorphism better.</p>
  
  <p>I get this error during execution:
  <strong>Cannot cast from source type to destination type</strong></p>