# State

The current values of an object's data at a moment in time.

## What is **State**?

An object's **state** is the current values of its data. A light switch object might be in the "on" state or the "off" state. Calling methods usually changes the state.

```csharp
var lamp = new Lamp();  // IsOn = false
lamp.TurnOn();          // IsOn = true: the state changed
```

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

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/state
