# this / self

The keyword a method uses to refer to the object it was called on.

## What does `this / self` do?

`this` (C#, Java, JavaScript) or `self` (Python) is how code inside a method refers to *the current object*: the one the method was called on.

```csharp
public class Person
{
    private string name;

    public Person(string name)
    {
        this.name = name; // this.name = the object's field; name = the parameter
    }
}
```

Level: Apprentice · [More OOP terms at this level](https://www.ask-codey.com/glossary/subjects/oop/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/this-self
