Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

vb.net

linq

I got an object of

List<List<string>>

I need to bring this into a

List<string>

I have no idea how to do this with LINQ.

like image 989
Fredou Avatar asked Dec 15 '10 15:12

Fredou


1 Answers

List<string> results = original.SelectMany(x => x).ToList();
like image 178
LukeH Avatar answered Nov 12 '22 21:11

LukeH