Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# Newbie Question..
Message
 
À
16/03/2003 16:57:28
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00766381
Message ID:
00766526
Vues:
21
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform