工作总结 for 另类写法 循环加时间 集合合并 也是用的 static class Enumerable (IEnumerable<T>的扩展方法) (IEnumerable<T> 的 工具类) (所有集合 数组都实现IEnumerable<T>)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { //Convert.ToInt32("") //for (int i = 0; ; ) //{ // if (i < 5) // { // Console.WriteLine(i); // } // i++; //} 会报错 死循环 一直进 循环 List<DateTime> liststr = new List<DateTime>(); //DateTime d1 = DateTime.Parse(startdate); )) { liststr.Add(d1); } string sss = ""; foreach (var item in liststr) { Console.WriteLine(item); } Console.WriteLine(); List<object> o1 = new List<object>() { " }, " }, " }, " }, }; List<object> o2 = new List<object>() { " }, " }, " }, " }, }; List<object> o3 = new List<object>() { " }, " }, " }, " }, }; var arrcount = o1.Union(o2).Union(o3).ToList(); var arrcounts = o1.Concat(o2).Concat(o3).ToList(); string[] str = { "a", "b", "c", "d" }; str.Where(n => n == "a"); str.Where(n => n == "b"); "); foreach (var item in str) { Console.WriteLine(item); } } } }
也是 这里面的
都是 Enumerable 里面的
工作总结 for 另类写法 循环加时间 集合合并 也是用的 static class Enumerable (IEnumerable<T>的扩展方法) (IEnumerable<T> 的 工具类) (所有集合 数组都实现IEnumerable<T>)的更多相关文章
- IEnumerable接口的扩展方法
/// <summary>/// IEnumerable接口的扩展方法,支持它的实现类是List的情况/// </summary>using System.Collection ...
- C#对IQueryable<T>、IEnumerable<T>的扩展方法
#region IQueryable<T>的扩展方法 #region 根据第三方条件是否为真是否执行指定条件的查询 /// <summary> /// 根据第三方条件是否为真是 ...
- 时间工具类之"获取相差天数"
一.时间工具类DateUtils之"获取相差天数" 1 /** 2 * 相差天数 3 * 4 * <p>TODO 方法功能描述 5 * 6 * @param start ...
- 表单配置项写法,表单写成JSON数组套对象,一行是一个数组单位,一列是一个对象单位,然后再写一个公共组件读取这个配置,循环加载slot,外层载入slot的自定义部分,比如input select等,这种写法就是把组件嵌套改为配置方式
表单配置项写法,表单写成JSON数组套对象,一行是一个数组单位,一列是一个对象单位,然后再写一个公共组件读取这个配置,循环加载slot,外层载入slot的自定义部分,比如input select等,这 ...
- 实现LoaderCallbacks接口动态循环加载网上图片并展示在手机屏幕上 ...
1.布局xml文件 activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/re ...
- 关于ES6的module的循环加载
今天写js时,碰到了一个模块循环加载的错误,下面时例子: // testa.mjs import testb from './testb.mjs'; const {b} = testb; const ...
- 小程序自定义pick(日期加时间组合)
最近小程序有个需求要使用日期加时间的pick组件 翻了小程序文档似乎没有符合的 手写一个 新建组件picker.js: Component({ properties: { disabled: { t ...
- vue父组件为子组件传值传不过去?vue为数组传值,不能直接用等于的方式,要用循环加push的方式
父组件为子组件传值不成功,子组件拿不到值,不能直接赋值,要用循环加push的方式赋值.
- Javascript获取For循环所用时间
第一种: let tOne = new Date().getTime(); let n = new Date(); let hour = n.getHours() < 10 ? "0& ...
随机推荐
- CPU怎么计算1+1----CPU计算的电路基础
从<十进制和二进制的运算---我所理解到的人类的运算的本质>这里我们知道,人类进行运算的本质是查表,并且我们存储的表是有限的.那么计算机是怎进行四则运算的呢,也是查表吗,肯定不是,今天,我 ...
- Sql Server cross apply和outer apply
with result as( select t.str from( ' str union all ' str union all ' str union all ' str union all ' ...
- js 上传图片、压缩、旋转
亲测 <!doctype html> <html> <head> <meta charset="utf-8"> <title& ...
- No-8.循环
01. 程序的三大流程 在程序开发中,一共有三种流程方式: 顺序 —— 从上向下,顺序执行代码 分支 —— 根据条件判断,决定执行代码的 分支 循环 —— 让 特定代码 重复 执行 02. while ...
- ssh架包下载地址
1.连接MySQL数据库所需架包点击进入官网下载 2.连接Oracle数据库所需架包点击进入官网下载 3.JUnit测试所需架包点击进入官网下载或者点击进入官网下载 4.Struts所需架包点击进入官 ...
- PHP:GD库 图片水印处理
文章来源:http://www.cnblogs.com/hello-tl/p/7592974.html <?php /** * 处理图片类 * 1.添加文字水印 * 2.添加图片水印 * 3.压 ...
- HDU 2475 Box
Box Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 247564 ...
- Leetcode 153.寻找旋转数组中的最小值
寻找旋转数组中的最小值 假设按照升序排序的数组在预先未知的某个点上进行了旋转. ( 例如,数组 [0,1,2,4,5,6,7] 可能变为 [4,5,6,7,0,1,2] ). 请找出其中最小的元素. ...
- 防火墙内设置FileZilla Server注意事项
开启了Windows下的防火墙,如何设置FileZilla Server 相关选项,能在服务器端只开启21,23端口就可以正常连接使用 方法/步骤 1. 开启windows防火墙,同时 ...
- linux & chmod & 777
linux & chmod & 777 https://github.com/xgqfrms-GitHub/Node-CLI-Tools/blob/master/bash-shell- ...