Rajeev Punhani
How to merge two lists in c#?
By Rajeev Punhani in .NET on Mar 17 2016
  • Rajeev Punhani
    Mar, 2016 17

    List employees = new List() { new Employee { EmpID = 1 , Name ="Martin"}, new Employee { EmpID = 2 , Name ="Peter"}, new Employee { EmpID = 3 , Name ="Michael"}, new Employee { EmpID = 3 , Name ="Michael"} }; List employees2 = new List() { new Employee { EmpID = 1 , Name ="Abundantcode"}, new Employee { EmpID = 2 , Name ="Best Programmer"}, new Employee { EmpID = 3 , Name ="Mike"}, new Employee { EmpID = 3 , Name ="Michael"} }; var MergedEmployees = employees.Union(employees2).ToList();

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS