When programming, say, a control should I use the objects of the control
directly, reference them from this, or use, if possible, the ones passed
through event arguments?
e.g., in a paint event I can use this. or just access the fields and methods
of the control directly or use the painteventargs argument passed. Say I
want to draw a line on the control.
What I'm a little confused about is when to use "this.". I know its mainly
used for qualification on the current instance of the object but is there
any other reason to use it? And is there any reason to use the event args
when one can use the current instance directly?
Thanks,
Jon
directly, reference them from this, or use, if possible, the ones passed
through event arguments?
e.g., in a paint event I can use this. or just access the fields and methods
of the control directly or use the painteventargs argument passed. Say I
want to draw a line on the control.
What I'm a little confused about is when to use "this.". I know its mainly
used for qualification on the current instance of the object but is there
any other reason to use it? And is there any reason to use the event args
when one can use the current instance directly?
Thanks,
Jon
Comment