Getting 'this' of outer class?

David Mac davidjohnmac at gmail.com
Sat Sep 16 08:25:16 PDT 2006


To get the object reference of an outer class from an inner class:

class A
{
  class B
  {
    B getB {return this;}
    A getA {return A.this;}
                 //=======//

  }
}



More information about the Digitalmars-d-learn mailing list