Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error for nested private interface #101

Open
mssucksalot opened this issue Dec 5, 2024 · 0 comments
Open

Compilation error for nested private interface #101

mssucksalot opened this issue Dec 5, 2024 · 0 comments

Comments

@mssucksalot
Copy link

This can be compiled in old .NET

public class MyClass : MyClass.IMySubclass
{
    private interface IMySubclass
    {
        void ShowMe();
    }

    void IMySubclass.ShowMe()
    {
        Console.WriteLine("I am!");
    }

    public void Test()
    {
        IMySubclass mys = this;

        mys.ShowMe();
    }
}

It is supported at least since .NET Framework 4.8. I was not able to test earlier versions of VS like 2017, 2019.

However, H5 is oriented to .NET Core / .NET and at least C# version 7.2. So it must be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant