Anonomous class instances
Frank Benoit
keinfarbton at googlemail.com
Sun Apr 6 10:18:23 PDT 2008
Bill Baxter schrieb:
> I see a lot of this in the DWT examples:
>
> new class() Listener { ... }
>
> Didn't even know you could do that till I saw it in DWT. But I just now
> ran across an example like this:
>
> new class Listener { ... }
>
> Is there a difference? If I had to guess I'd say the first one was
> creating a no-argument anonymous class template, but I have no idea why
> you'd want that instead of a regular anonymous class.
>
> --bb
I think they are the same. The () is the optional arguments list to the
ctor call.
More information about the Digitalmars-d-dwt
mailing list