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.

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

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

Level: Journeyman · More C# terms at this level

Updated

In other subjects