zoukankan      html  css  js  c++  java
  • 9. 生成操作符—【LINQ标准查询操作符】

    public class Empty_LINQ
        {
            public static void Empty_Print()
            {
                string[] name1 = { "Asfs", "Steve" };
                string[] name2 = { "Joe", "Jhon", "Sawyer", "Sayid" };
                string[] name3 = { "Dave", "Kate", "Juliet", "Sara" };
    
                List<string[]> names = new List<string[]> { name1, name2, name3 };
                IEnumerable<string> nameList = names.Aggregate(Enumerable.Empty<string>(),
                    (current, next) => next.Length > 2 ? current.Union(next) : current);
    
                foreach (string s in nameList)
                {
                    Console.WriteLine(s);
                }
            }
    
            public static void Range_Print()
            {
                foreach (var item in Enumerable.Range(1,10))
                {
                    Console.WriteLine(item.ToString());
                }
    
                foreach (var item in Enumerable.Range(1, 10).Reverse())
                {
                    Console.WriteLine(item.ToString());
                }
    
                foreach (var item in Enumerable.Range(1, 5).Select(x => x * 5))
                {
                    Console.WriteLine(item.ToString());
                }
            }
    
            public static void Repeat_Print()
            {
                foreach (var item in Enumerable.Repeat("I love you",3))
                {
                    Console.WriteLine(item.ToString());
                }
            }
        }
    
    天天来(http://www.daydaycome.com)】- 精选折扣商品,爆料精选,九块九白菜底价尽在天天来!是一个中立的,致力于帮助广大网友买到更有性价比网购产品的分享平台,每天为网友们提供最受追捧 最具性价比 最大幅降价潮流新品资讯。我们的信息大部分来自于网友爆料,如果您发现了优质的产品或好的价格,不妨给我们爆料(谢绝商家)
  • 相关阅读:
    oracle添加字段,备注
    oracle对日期date类型操作的函数
    查询效率例子收藏
    webuploader.min.js 简单例子
    select 数字/字符串/count(参数)/sum(数字) from table
    oracle常用分析函数 over(partition by xxx order by xxx)
    LigerUi遮罩的两个方法
    LigerUI子父窗口之间传参问题
    LigerUi自动检索输入
    LigerUi折叠与展开
  • 原文地址:https://www.cnblogs.com/Reborn/p/1714444.html
Copyright © 2011-2022 走看看