摘要:
1.LINQ基本语法View Code string[]nameList=newstring[5]{"张1","张2","张3","李四","王五"};//基本查询语句from实例名in数组或表名select实例名varname=fromninnameListselectn;foreach(varsinname){Console.WriteLine("姓名:{0}",s);}Console.WriteLine("\n\n");//where筛选条件name 阅读全文