当前位置:网站首页>LINQ query
LINQ query
2022-06-23 00:37:00 【flysh05】
1. Linq Inquire about
grammar :
var QueryResults= from x in Enumerating collections
where Conditions
OrderBy Field Ascending/Descending
Select x;
Extension method :
var QueryResults= Enumerating collections .Where( Conditions )
.OderByDescending( Conditions )
.Select( Field );
Filter data that meets the criteria , Commonly used Linq Syntax or extension method .
2. Postpone query
var names = new List { “Nino”, “Alberto”, “Juan”, “Mike”, “Phil” };
var namesWithJ = from n in names
where n.StartsWith(“J”)
orderby n
select n;
WriteLine(“First iteration”);
foreach (string name in namesWithJ)
{
WriteLine(name);
}
WriteLine();
names.Add(“John”);
names.Add(“Jim”);
names.Add(“Jack”);
names.Add(“Denny”);
WriteLine(“Second iteration”);
foreach (string name in namesWithJ)
{
WriteLine(name);
}
WriteLine();
The output remains the same between iterations , But the values in the set changed .
边栏推荐
- Is it safe to invest in funds through daily funds? I intend to open an account to buy funds
- 2022天梯赛-全国总决赛复盘赛
- What do you pay special attention to when you insert / update / delete / obtain millions of rows of data in a DML statement?
- Binary tree to string and string to binary tree
- Ansible 学习总结(8)—— Ansible 控制提权相关知识总结
- How to use swagger2
- Kunlun distributed database technology advantages
- Kunlundb query optimization (III) sort push down
- cadence SPB17.4 - 中文UI设置
- SAP UI5 应用开发教程之一百零二 - SAP UI5 应用的打印(Print)功能实现详解试读版
猜你喜欢
因为我说:volatile 是轻量级的 synchronized,面试官让我回去等通知!

Typecho imitation of Lu Songsong's blog theme template / Technology Information blog theme template

Analysis on the wallet system architecture of Baidu trading platform

BGP联邦综合实验

Oracle ASM uses the CP command in asmcmd to perform remote replication

Introduction to the unique variable reading and writing function of Kunlun distributed database

How to use swagger2

Typecho仿盧松松博客主題模板/科技資訊博客主題模板

外包干了四年,感觉废了..

你踩过这些坑吗?谨慎在时间类型列上创建索引
随机推荐
a++,++a,!,~
启牛学堂属于证券公司吗?开户安全吗?
JSBridge
【GO】go多态
Several abnormal scenarios of things system
昆仑分布式数据库Sequence功能及其实现机制
【GO】go语言interface
Redistemplate encountered problems with \x00
Figure what are the uses and applications of neural networks?
ECMAScript6新特性
Hello, is the securities account presented by the Business School of qiniu business school safe? How can I open a safe stock account to speculate in stocks
图神经网络有哪些用途和应用?
KunlunDB查询优化(三)排序下推
二叉树转字符串及字符串转二叉树
Is Ruida futures safe? What are the procedures for opening futures accounts? How to reduce the futures commission?
Kunlun distributed database technology advantages
百度交易中台之钱包系统架构浅析
New paradigm of semantic segmentation! Structtoken: Rethinking the per pixel classification paradigm
EasyCVR使用RTMP推流时不显示界面如何解决?
Typecho imitation of Lu Songsong's blog theme template / Technology Information blog theme template