标签:sel int lis OLE new t equals man 连接 name
static void Main(string[] args)
{
List<Man> list = new List<Man>();
for (int i = 0; i < 10; i++)
{
Man d = new Man();
d.Age = i ;
d.Name = i.ToString();
list.Add(d);
}
List<Test> name = new List<Test>();
for (int i = 5; i < 10; i++)
{
Test d = new Test();
d.Name = i.ToString();
name.Add(d);
}
List< Test> tsss = (from li in list
join nm in name
on li.Name equals nm.Name
where li.Age > 5
select new Test
{
Name = li.Name,
NameAge = nm.Name + li.Age.ToString()
}).ToList();
Console.WriteLine();
}
标签:sel int lis OLE new t equals man 连接 name
原文地址:https://www.cnblogs.com/SHa-Jazy/p/14743278.html