এগ্রিগেশন (Aggregation) C#-এ অবজেক্টের মধ্যবর্তী একটি ডিরেকশনাল রিলেশন (directional relation)। এটি অবজেক্টগুলোর মধ্যে সম্পর্ক বোঝায়।
উদাহরণস্বরূপ, Employee এবং Address।
একটি Employee একটি Department-এর সাথে asoshiate (associated) থাকে, কিন্তু একটি Department-এ একাধিক Employee থাকতে পারে। Employee এবং Address-এর উদাহরণ নিচে দেওয়া হলো:
public class Address {
// ...
}
public class Employee {
private Address addr;
public Employee(Address addr) {
this.addr = addr;
}
// ...
}