public class Employee { public byte ID { get; set; } public string Name { get; set; } } public class Task { public int ID { get; set; } public string Description { get; set; } private List<Employee> employeeTask ; public List<Employee> EmployeeTask { get { if (employeeTask == null) { employeeTask = //Any Source changeable ; } return employeeTask; } } } class Program { void main() { List<Task> ListTask = //fill with groub of Tasks; /*When Call property EmployeeTask in every Object in list (ListTask), the property(EmployeeTask) in all Object have the Same content (have last content element)*/ } }
Task
EmployeeTask
List<Employee>
employeeTask
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)