Create the array of object in the list at the time of initiations.
There are creating the array of the list object at the time of initiations.
List<Employee> players = new List<Employee>
{
new Employee { Name = "John", Designation= "Manager" },
new Employee { Name = "Ross", Designation = "Worker" },
new Employee { Name = "Eric", Designation = "leader" },
new Employee { Name = "Josh", Designation = "Manager" },
new Employee { Name = "Mandy", Designation = "Worker" },
new Employee { Name = "Flora", Designation = "Manager" },
new Employee { Name = "Garry", Designation = "Worker" },
new Employee { Name = "Joseph", Designation = "Worker"},
new Employee { Name = "Murray", Designation = "leader"},
new Employee { Name = "Henry", Designation = "leader"},
new Employee { Name = "Watson", Designation = "Worker"},
new Employee { Name = "Linda", Designation = "Manager"}
};
No comments:
Post a Comment