Home > Backend Development > C#.Net Tutorial > What are aggregates in C#?

What are aggregates in C#?

PHPz
Release: 2023-08-28 22:53:08
forward
1248 people have browsed it

What are aggregates in C#?

Aggregation is a directional relationship between objects in C#. It is a relationship between objects.

For example, employees and addresses

An employee is associated with a department, and a department can have multiple employees. Let’s see an example of employee and address -

public class Address {
   . . .
}

public class Employee {

   private Address addr;

   public Employee (Address addr) {

      this.addr = addr;

   }

   . . .

}
Copy after login

The above is the detailed content of What are aggregates in C#?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template