Both, aggregation and composition are parent/child relationships. The difference is that in composition, the parent controls the life time (creation/destruction) of the object.
An example of composition is when you drop a control inside a form. The form will take care of creating/destroying the object.
Take a look at:
http://ootips.org/uml-hasa.html>Hi,
>
>I understand how Inheritance can be used in C#. I am also able to understand how Inheritance is coded in C#.
>
>However, Composition/Aggregation and how they can be interpreted in code eludes me.
>
>Could someone explain how I would use composition/aggregation in code.
>
>Thank You,
>
>Alvin
Hector Correa