# Getter

say it: **“GET-er”** **/ˈɡɛtər/**

A method or property part that reads a value from an object.

## What is **Getter**?

A **getter** is a method (or property part) that returns a value from an object. It lets outside code read data without touching the private field directly.

```csharp
public class Thermostat
{
    private int temperature = 20;
    public int Temperature { get => temperature; }  // getter
}
```

Level: Apprentice · [More OOP terms at this level](https://www.ask-codey.com/glossary?category=oop&level=2)

Updated: November 17, 2026

## In other subjects

- [Getter in C#](https://www.ask-codey.com/glossary/getter-c-sharp)
- [Getter in Java](https://www.ask-codey.com/glossary/getter)
- [Getter in JavaScript](https://www.ask-codey.com/glossary/getter-javascript)

Source: https://www.ask-codey.com/glossary/getter-oop
