Given a base class with the following interface:
public class Base
{
public virtual IEnumerable GetListOfStuff()
{
yield return \"F
It's because the iterator gets turned into a private class, and accessing superclass methods from an inner class is not verifiable (as it has to force the 'this' pointer to something other than itself).
Try creating a new private method in Derived
:
private IEnumerable GetBaseListOfStuff()
{
return base.GetListOfStuff();
}
and call that instead of base.GetListOfStuff()