以下代码,返回List,list内容为大于60的项

public Form1()
{
  InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
  IEnumerable<int> arry = A();
  List<int> list = arry.ToList();
}

private IEnumerable<int> A() {
  int[] scores = new int[] { 55, 56, 57, 58, 59, 69, 70, 33 };
  foreach (var item in scores)
  {
    if (item > 60)
    {
      yield return item;
    }
  }
}

最新文章

  1. JavaScript 的倒计时
  2. Mysql复合索引
  3. reference local jar &amp; customize manifest
  4. Memcached和Redis对比和适用场景
  5. cas 单点登录出现org.jasig.cas.client.util.CommonUtils.getResponseFromServer - 拒绝连接 Connection refused
  6. c#写windows服务(转)
  7. Java基础之线程——使用Runnable接口(JumbleNames)
  8. Windows2008下搭建NFS实现windows空间提供linux使用
  9. hdu5909-Tree Cutting(树形dp)
  10. VirtualBox NAT方式与主机互相通信
  11. 【POJ2114】Boatherds 树分而治之
  12. [Zookeeper研究]一 Zookeeper技术简介
  13. Redis系列之(二):Redis主从同步,读写分离(转)
  14. Java面试题-2
  15. ajax的嵌套需要注意的问题
  16. 谷歌浏览器把网页打印成pdf
  17. Mobile Computing: the Next Decade论文 cloudlet薄云
  18. POJ 2437 Muddy roads【贪心】(区间覆盖)
  19. 【作业】DS稀疏矩阵
  20. SpringBoot整合Graylog3.0

热门文章

  1. maven配置logback
  2. C# 实现对PPT编辑
  3. C# 集合的使用List&lt;T&gt;的使用
  4. 使用word文档直接发表博客 8 )
  5. ComponentSpace SAML v2.0 for .NET 使用介绍
  6. VS 和Visual Assist X快捷键(转)
  7. shiro开启realm
  8. python语言的jenkinapi
  9. RobotFramework中查询数据库相关
  10. django 返回json