次のコードでコンパイル エラーが発生しますが、その理由がわかりません。
class RealMock<TEntity> : DataContext
{
public RealMock():base("")
{
}
public List<TEntity> inMemoryDataStore = new List<TEntity>();
public List<TEntity> GetTable<TEntity>() where TEntity : class
{
return inMemoryDataStore; //Compilation error
}
}
タイプ 'System.Collections.Generic.List [c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll]' を 'System.Collections.Generic.List [ c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll]'