+ 2

How to use 'this' keyword?

4th Sep 2016, 5:46 AM
Arul arasan
Arul arasan - avatar
6 Answers
+ 1
You mean the "this" keyword? "this" keyword simply refers to the current class you are in. "this class" is what in means.
4th Sep 2016, 11:49 AM
Erwin Mesias
Erwin Mesias - avatar
+ 1
For the sake of correctness, the this keyword refers to the current instance/object of a class. It does not exist in static classes where there can never be a instance of the class, and you also cannot use it inside of static member functions as they work in a instance spanning, class wide manner.
4th Sep 2016, 10:56 PM
René Schindhelm
René Schindhelm - avatar
+ 1
this keyword represent of current object of the class.
8th Sep 2016, 11:00 AM
jay kashyap
jay kashyap - avatar
+ 1
this keyword refers to current object
10th Sep 2016, 3:18 AM
PRANJAL AGNIHOTRI
PRANJAL AGNIHOTRI - avatar
0
ok
4th Sep 2016, 6:07 AM
Arul arasan
Arul arasan - avatar
0
That's like the pointer that point the current class where u have been
6th Sep 2016, 9:51 AM
Imran Bashir
Imran Bashir - avatar