工作总结 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& ...
随机推荐
- width:100px; min-width:100% 解释:宽度大于100px 就是100% 小于100px 就是100像素
<div style="width:100px; background-color: aqua; min-width:100%">kkk</div>
- win7 命令行禁用开启usb存储
禁用: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor" /v Start /t reg ...
- js 随机生成颜色
方法一 function randomColor (){ var str='#'; for(var i=0;i<6;i++){ str+=Math.floor(Math.random()*16 ...
- 安装Vmware Tools出现错误
安装Vmware Tools出现: Before you can compile modules, you need to have the following installed... makegc ...
- element-UI 多表单重置的时候的坑
问题细化一下是这样的:比如我有一个用来修改数据的表单,第一条数据是{name: 'Xixi', age: 12},打开表单后就有两个输入框分别填的是Xixi和12,此时我修改Xixi为Haha,调用t ...
- MFC对话框使用CPrintDialog实现打印,指定打印机、后台打印
推荐下 不错. 对话框打印,网上一搜一大堆,基本分2类: A类: CPrintDialog.DoModal,然后在模态对话框里选打印机.打印配置: B类:GetPrinterDeviceDefault ...
- CodeForcesGym 100512D Dynamic LCA
Dynamic LCA Time Limit: 2000ms Memory Limit: 262144KB This problem will be judged on CodeForcesGym. ...
- Centos下安装X Window+GNOME Desktop+FreeNX
FreeNX是近年来继VNC之后新出现的远程控制解决方案,基本原理是将XWindows的信号压缩后传输到远程客户端显示,而VNC是直接截取 屏幕图像处理传输.这样,在同样的传输信道条件下,FreeNX ...
- URAL 1297 求最长回文字符串
有种简单的方法,数组从左到右扫一遍,每次以当前的点为中心,只要左右相等就往左右走,这算出来的回文字符串是奇数长度的 还有偶数长度的回文字符串就是以当前扫到的点和它左边的点作为中心,然后往左右扫 这是O ...
- JPA的一些坑
推荐一篇比较好的介绍JPA的文章:使用 Spring Data JPA 简化 JPA 开发 JPA坑1:不支持Limit查询 JPA是不支持Limit分页查询,而我们有时又因为某些原因不想用JPA提供 ...