Reflection: is type an inner class

Jonathan M Davis jmdavisProg at gmx.com
Sat Oct 20 20:48:28 PDT 2012


On Sunday, October 21, 2012 05:39:54 Andrej Mitrovic wrote:
> On 10/21/12, Tyler Jameson Little <beatgammit at gmail.com> wrote:
> > Say I have something like this:
> > class A {
> > 
> > class B {
> > }
> > 
> > B b;
> > 
> > }
> 
> I can't find a way to figure out if the inner type is static or not.

How about checking whether it has an outer property? IIRC, B should have a 
.outer which refers to the instantiation of A that holds it, since it's
non-static, whereas if it were static, there would be no such property.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list