What is the benefit of this operator?

classic Classic list List threaded Threaded
3 messages Options
Indian Indian
Reply | Threaded
Open this post in threaded view
|

What is the benefit of this operator?

What is the benefit of this operator when we can access all member elements directly by their reference or handler ?
buggybread buggybread
Reply | Threaded
Open this post in threaded view
|

Re: What is the benefit of this operator?

The only use is, if we have member element with the same name as of local variable. That way we can distinguish between the 2 by specifying this for member element.
www.buggybread.com
John John
Reply | Threaded
Open this post in threaded view
|

Re: What is the benefit of this operator?

That's wrong. There are additional uses of this operator

2. Constructor Chaining
3. Object Passing itself to some external method.