# Composition

Building a class from other objects that handle parts of its work.

## What is **Composition** in C#?

**Composition** — Building a class from other objects that handle parts of its work.

```csharp
class Engine
{
    public string Start()
    {
        return "Started";
    }
}

class Car
{
    readonly Engine engine = new();
}
```

Level: Journeyman · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/journeyman)

Updated: September 27, 2026

## In other subjects

- [Composition in Java](https://www.ask-codey.com/glossary/composition)
- [Composition in OOP](https://www.ask-codey.com/glossary/composition-oop)

Source: https://www.ask-codey.com/glossary/composition-c-sharp
