Convert List to List in C#

前端 未结 8 2293
长情又很酷
长情又很酷 2021-02-12 13:01

I want to convert a List to a List.

Here is my code:

void Convert(List stringList)
{         


        
8条回答
  •  抹茶落季
    2021-02-12 13:42

    Instead of using LINQ you can use List.ConvertAll(...)

    List intList = stringList.ConvertAll(int.Parse);
    

提交回复
热议问题