© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
15 replies
The Orange Tea Frog

❔ Why hasn't my class implemented the interface?

public interface IFoo
{
    public IEnumerable<int> Get();
}

public class foo: IFoo
{
    public List<int> Get()
    {
        return null;
    }
}
public interface IFoo
{
    public IEnumerable<int> Get();
}

public class foo: IFoo
{
    public List<int> Get()
    {
        return null;
    }
}


Given that
List<int>
List<int>
is a subtype of
IEnumerable<int>
IEnumerable<int>
I don't see what the issue is here.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Class showing Interface member not implemented
C#CC# / help
3y ago
Why `where T: class`
C#CC# / help
2y ago
Invoke explicitly implemented static interface method
C#CC# / help
12mo ago
✅ Abstract Class vs Interface
C#CC# / help
10mo ago