开发者

with LINQ, how to transfer a List<List<string>> to List<string>?

开发者 https://www.devze.com 2023-01-31 06:03 出处:网络
I got an object of List<List<string>> I need to bring this into开发者_StackOverflow a List<string>

I got an object of

List<List<string>>

I need to bring this into开发者_StackOverflow a

List<string>

I have no idea how to do this with LINQ.


List<string> results = original.SelectMany(x => x).ToList();
0

精彩评论

暂无评论...
验证码 换一张
取 消