Class knowing its own Class

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 29 15:05:13 PDT 2010


On Tue, 29 Jun 2010 17:59:37 -0400, strtr <strtr at sp.am> wrote:

> What is the pretty way to do something like this?
>
> Class C
> {
>   void makeNew()
>   {
>     new typeof(this);
>   }
> }

As edited...

-Steve


More information about the Digitalmars-d-learn mailing list