Skip to content

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

@shimmerkopf

Description

@shimmerkopf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions