When you use thisinside a class, you are referring to the current instance: an instance of this class.
public class Person {
private string firstName;
private string lastName;
public Person(string firstName, string lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
In the above example, it this.firstNamerefers to the field of the firstNamecurrent instance of the class Person, and firstName(the right part of the destination) refers to the variable defined in the constructor area.
So when you do this:
Person me = new Person("Oscar", "Mederos")
thisrefers to an instance Personinstance me.
Edit:
this , .
this () , , : a[0], a["John"],...