Hi !
Could some help with some tutorial about Object Associations: Aggregation and Containment. in C#
I tried hard to figure out what does it mean but still I didn' t get the idea more cleare ,
Br
Henry
Object Associations: Aggregation and Containment
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Pravin MoreRank #1,419 · 1.2K reputationPosted Dec 5, 2011, 3:17 AM EST
Hi Henry,
1.Containment describes the idea of one class having a data member that is an object of another type.i.e You can create a class which can use a object of another class.
for e.g:-Delegation expresses the idea that one class uses another class to accomplish a task or goal. Delegation is usually accomplished by containment.
2.Aggregation is a specialize form of Association where all object have their own lifecycle but there is ownership and child object can not belongs to another parent object. Let's take an example of Department and teacher. A single teacher can not belongs to multiple departments, but if we delete the department teacher object will not destroy. We can think about "has-a" relationship.
Thanks,
Pravin.