# Adapter Pattern

*noun*

say it: **“uh-DAP-ter PAT-urn”** **/əˈdæptər ˈpætərn/**

A design pattern that wraps one thing so it fits the shape the rest of your code expects.

## What is **Adapter Pattern**?

The **Adapter pattern** puts a small class between your code and a class that doesn't fit, the way an interpreter lets two people who don't share a language talk. Your code calls the interface it expects, and the adapter turns each call into the other class's own methods.

```csharp
public class LumoLightAdapter : ILight
{
    private readonly LumoLight lumo = new();
    public void On() => lumo.SetPower(true);
    public void Off() => lumo.SetPower(false);
}
```

## In a sentence

- “The **Adapter pattern** let the old receipt printer work with the bakery's new code.”

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

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/adapter-pattern
