Inheriting from a nested class
BCS
ao at pathlink.com
Wed Nov 26 12:28:09 PST 2008
Reply to llee,
> Is it possible to inherit from a nested class from outside of the
> enclosing class? For example:
>
> class A
> {
> class B { int x; }
> }
> class C : B
> {
> int get () { return x; }
> }
no, sorry
that wouldn't work well anyway as the binding to A might get tricky
OTOH this would be really nice.
>class A
>{
> class B { int x; }
>}
>
>class C : A
>{
> class D : B
> {
> int get () { return x; }
> }
>}
More information about the Digitalmars-d-learn
mailing list