One of the projects is used to connect the list <t>. However, after the Concat method is called, the connection result is converted to ienumerable <t>. How can I convert it back?
The ienumerable interface was suddenly found to have a conversion method: public static list <tsource> tolist <tsource> (this ienumerable <tsource> source!
Appendix, Example 1:
Code
Ilist <student> studentlist1 = new list <student> ();
Student S1 = new student ();
S1.id = "1 ";
S1.name = "James ";
Studentlist1.add (S1 );
Ilist <student> studentlist2 = new list <student> ();
Student S2 = new student ();
S2.id = "2 ";
S2.name = "Li Si ";
Studentlist2.add (S2 );
List <student> xxx = studentlist1.tolist ();
Xxx. addrange (studentlist2.tolist ());
Int C1 = xxx. count;
Ilist <student> YYY = studentlist1.concat (studentlist2). tolist <student> ();
Int C2 = yyy. count;
Online example address
NOTE: With a reminder from a colleague, I found a conversion method addrange and modified it to the sample code.