partial class

Ary Borenszweig ary at esperanto.org.ar
Fri Oct 31 17:19:02 PDT 2008


Mike James escribió:
> Not sure if this has been suggested before as an addition to D but what about introducing a partial class as per C# - with all the benefits it would bring...

Julio's second example convinced me that partial classes are useful. But 
in D you can already do that, sort of:

class Foo {

   // Methods handled by the user
   void one() { }
   void two() { }
   // ...

   mixin GeneratedFoo!();

}

// far, far away
template GeneratedFoo() {

   void three() { }
   void four() { }

}



More information about the Digitalmars-d mailing list