
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Association, Composition and Aggregation in C#
Association in C#
The association defines the relationship between an object in C#. An a one-to-one, one-to-many, many-to-one and many-to-many relationship can be defined between objects.
For example, An Employee can be associated with multiple projects, whereas a project can have more than one employee.
Composition in C#
Under Composition, if the parent object is deleted, then the child object also loses its status.
The composition is a special type of Aggregation and gives a part-of relationship.
For example, A Car has an engine. If the car is destroyed, the engine is destroyed as well.
Aggregation in C#
Aggregation is a direct relation between objects in C#. It is the relationship between objects.
For example, Employee and Department.
An Employee is associated with a single Department, whereas a Department can have more than one employee
- Related Articles
- Association, Composition and Aggregation in Java\n
- Composition vs Aggregation in C#
- Difference Between Aggregation and Association
- Difference between Association and Aggregation in Java
- Difference between composition and aggregation
- Difference Between Aggregation and Composition
- What are the difference between Composition and Aggregation in C#?
- What is Evaluation, Precedence and Association in C language?
- What is aggregation in C#?
- What is composition in C#?
- Inheritance vs Composition in C#
- C++ code to kid chair association
- Difference Between Link and Association
- MongoDB aggregation and projection?
- American Psychological Association and Ethical Codes
