首页 / 软件开发 / C# / C#中LINQ写法
C#中LINQ写法2011-04-04有人问起C#的LINQ写法...也很简单...关键的地方稍微修改一下,差不多是底下这样...//查询BMI值大于25的人
var result = from c in matrix where c.BmiValue > 25 select c;
//显示名称
foreach (string item in (from c in result select c.name)) {
MessageBox.Show (item);
}