Learner Learner - 5 months ago 27
ASP.NET (C#) Question

constructor of nType hits on creating a List<nType> object?

I am just curious if the line below hits the constructor of Employee on execution of this line?

List<Employee> exmployees = new List<Employee>();


Are you looking for this?

Employee = new List<Employee>(){ new Employee("1")//Here constructor get called, 
                                            new Employee("12"),
                                            new Employee("123") };