Getting 'this' of outer class?

Nick Nick_member at pathlink.com
Sun Feb 19 06:46:34 PST 2006


I'm sort of new to the inner class concept. I know the inner class has access to
the outer class through a 'hidden' this reference, but how do I access this
reference directly? Say I have the following:

# class A
# {
#    class B
#    {
#        B getB() { return this; } // Ok
#        A getA() { return ???; } // How do I do this?
#    }
# }

Right now I'm stuck with adding a private getThis() member to A...

Nick





More information about the Digitalmars-d-learn mailing list