readonly?

Namespace rswhite4 at googlemail.com
Tue Jul 10 16:05:07 PDT 2012


> class Bar
> {}
>
> class Foo
> {
>     const(Bar) * _b;
>
>     void SetBar(const(Bar) * b) {
>         _b = b;
>     }
> }
>
> void main()
> {
>     auto b = new Bar();
>     auto f = new Foo();
>     f.SetBar(&b);
> }
>
> Ali

Hmm... That's good. Thanks.


More information about the Digitalmars-d-learn mailing list