Home > Net >  C # to merge the two List collection
C # to merge the two List collection

Time:01-16

List StrList1=new List {" hello ", "welcome", "goodbye"};
List StrList2=new List {" hello ", "good morning", "good afternoon", "good evening"};

List Result1=strList1. Union (strList2). ToList (a);//remove duplicates
List Result2=strList1. Concat (strList2). ToList (a);//keep duplicates

CodePudding user response:


You want to express?

CodePudding user response:

So what are you share

CodePudding user response:

Learned, next time you can try to record in blog, don't send to the BBS
  • Related