this as lvalue?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Sep 5 18:42:42 PDT 2010
On 09/05/2010 05:02 PM, Andrej Mitrovic wrote:
> Does this mean assigning to fields won't be an option anymore when using this?
>
> E.g.:
>
> class Foo
> {
> int x;
> int y;
>
> void changeXY(int x, int y)
> {
> this.x = x;
> this.y = y;
> }
> }
No, guys, most everything will be the same. If you can write (new Foo).x
= x, then you can also write this.x = x. Try it now!
Andrei
More information about the Digitalmars-d
mailing list