Linq101-Generation
using System;
using System.Linq; namespace Linq101
{
class Generation
{
/// <summary>
/// This sample uses Range to generate a sequence of numbers from 100 to 149 that is used to find which numbers in that range are odd and even.
/// </summary>
public void Linq65()
{
var numbers = from n in Enumerable.Range(, )
select new { Number = n, OddEven = n % == ? "odd" : "even" }; foreach (var n in numbers)
{
Console.WriteLine("The number {0} is {1}.", n.Number, n.OddEven);
}
} /// <summary>
/// This sample uses Repeat to generate a sequence that contains the number 7 ten times.
/// </summary>
public void Linq66()
{
var numbers = Enumerable.Repeat(, ); foreach (var n in numbers)
{
Console.WriteLine(n);
}
}
}
}
Linq101-Generation的更多相关文章
- 论文阅读(Zhuoyao Zhong——【aixiv2016】DeepText A Unified Framework for Text Proposal Generation and Text Detection in Natural Images)
Zhuoyao Zhong--[aixiv2016]DeepText A Unified Framework for Text Proposal Generation and Text Detecti ...
- Task set generation
Task set generation for uni- and multiprocessors: “Unifying Fixed- and Dynamic-Priority Scheduling b ...
- 使用-MM生成include指令和依赖生成(make include directive and dependency generation with -MM)
I want a build rule to be triggered by an include directive if the target of the include is out of d ...
- PHPNG (next generation)
PHPNG (next generation) This page gives short information about development state of a new PHP branc ...
- test generation和MBIST
The problem of test generation Random test generation Deterministic algorithm for test generation fo ...
- 关于conversation generation的论文笔记
对话模型此前的研究大致有三个方向:基于规则.基于信息检索.基于机器翻译.基于规则的对话系统,顾名思义,依赖于人们周密设计的规则,对话内容限制在特定领域下,实际应用如智能客服,智能场馆预定系统.基于信息 ...
- 1094. The Largest Generation (25)
A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level bel ...
- Case Study: Random Number Generation(翻译教材)
很荣幸,经过三天的努力.终于把自己翻译的教材做完了,现在把它贴出来,希望能指出其中的不足. Case Study: Random Number Generation Fig. 6.7 C++ 标 ...
- Index Generation
Index Generation Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 230 Accepted: 89 Des ...
- PowerDesigner15(16)在生成SQL时报错Generation aborted due to errors detected during the verification of the mod
1.用PowerDesigner15建模,在Database—>Generate Database (或者用Ctrl+G快捷键)来生产sql语句,却提示“Generation aborted d ...
随机推荐
- bzoj2180: 最小直径生成树
Description 输入一个无向图G=(V,E),W(a,b)表示边(a,b)之间的长度,求一棵生成树T,使得T的直径最小.树的直径即树的最长链,即树上距离最远的两点之间路径长度. Input 输 ...
- How to solve "The specified service has been marked for deletion" error
There may be several causes which lead to the service being stuck in “marked for deletion”. Microsof ...
- GNU PID
多进程编程 写在前面的话 本文主要根据本人在UNIX系统上的编程实践经验总结而成, 既做为自己在 一个时期内编程实践的部分总结, 又可成为文章发表. 对UNIX程序员初学者来 说是一个小小的经验, 仅 ...
- Javascript Framework Scenario
Mobile----- zepto, jQuery Scroll------ iscrollhttp://cubiq.org/iscroll-4 jo.js widget----- jquery pl ...
- android 随手记 广播通知栏 二
关于通知栏的使用: Notification及NotificationManager的使用详解 相关类: import android.app.NotificationManager; import ...
- OpenCV 2.4.3在VS2010上的应用
一.下载和安装: 1.OpenCV 2.4.3下载:http://www.opencv.org.cn/index.php/Download#Version_2.4.3 2.下载完成后,解压 ...
- GNU工具链学习笔记
GNU工具链学习笔记 1..so为动态链接库,.a为静态连接库.他们在Linux下按照ELF格式存储.ELF有四种文件类型.可重定位文件(Relocatable file,*.o,*.a),包含代码和 ...
- poj 2503 Babelfish(字典树哈希)
Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 29059 Accepted: 12565 Description You hav ...
- 数据结构(动态树):[国家集训队2012]tree(伍一鸣)
[问题描述] 一棵n个点的树,每个点的初始权值为1.对于这棵树有q个操作,每个操作为以下四种操作之一: + u v c:将u到v的路径上的点的权值都加上自然数c: - u1 v1 u2 v2:将树中原 ...
- Oracle数据库操作常见异常总结
1.非法的sql语句结束符\n,抛 java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符 实际就是在sql语句的结尾多了标点符号. 2.无效的序列 通常都 ...