How do I upcast a collection of base class in C#?
<p>In C#, I have a class A that I cannot modify. From this class I've created class B (i.e. inherited from A) which adds some properties. I also have a static function that returns List<code>&lt;A&gt;</code> when GetListOfA() is called.</p>

<p>How can I cast the return from GetListOfA() to List<code>&lt;B&gt;</code>?</p>

<p>e.g. List<code>&lt;B&gt;</code> bList = foo.GetListOfA() as List<code>&lt;B&gt;</code>  </p>
