static class

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Feb 17 13:23:56 PST 2013


On 2/17/13, Michael <pr at m1xa.com> wrote:
> Why members of static class are not implicitly static?
>
> static class Test
> {
>   void foo() {}
> }
>

That's not the meaning of static in that context. The above is useful
in nested classes.

Instead you can use:

class Test
{
static:
    void foo() { }
}


More information about the Digitalmars-d-learn mailing list