foreach里面嵌套select
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
List<List<string>> lst = new List<List<string>>();
for (int i = 0; i < 10; i++)
{
List<string> t = new List<string>();
t.Add("a" + i.ToString());
t.Add("b" + i.ToString());
t.Add("c" + i.ToString());
lst.Add(t);
}
List<string> temp = new List<string>();
lst.ForEach(s =>
{
temp.AddRange(s.Select(t => t.ToString()).ToList());
});
}
}
}