Arrays of many different (sub)classes

Ali Çehreli acehreli at yahoo.com
Sun Apr 25 17:24:11 PDT 2010


Robert Clipsham wrote:

 > interface I
 > {
 >   int foobar();
 >   // The following line will cause an error when uncommented, as
 >   // you cannot implement methods in an interface
 >   // void baz() {}
 > }

Just to be complete: interfaces can have static or final functions in D2:

     static void baz() {}
     final void baz_2() {}

Ali


More information about the Digitalmars-d-learn mailing list