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

Invoking inner class constructor from method of second inner class #7

Open
shimmerkopf opened this issue Feb 16, 2021 · 0 comments
Open

Comments

@shimmerkopf
Copy link

Invoking inner class constructor from method belonging to second inner class does not convert correctly to C#.

Java:


public class A
{
    public class B
    {
    }

    public class C
    {
    	B b;

    	C()
    	{
            b = new B();
    	}
    }
}

C# conversion of class C:


    public class A_0024C: object
    {
        public A _o;
        public A_0024B b_f;

        public A_0024C(A _o):base()
        {
            this._o = _o;
            this.b_f = new A_0024B(this);
        }
    }

That is, C invokes constructor of B replacing A with itself.

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