当前位置:网站首页>Requête linq
Requête linq
2022-06-23 00:46:00 【Flysh05】
1. Linq Requête
Syntaxe:
var QueryResults= from x in Collection Enum
where Conditions
OrderBy Champ Ascending/Descending
Select x;
Approche élargie:
var QueryResults= Collection Enum.Where(Conditions)
.OderByDescending(Conditions)
.Select(Champ);
Filtrer les données admissibles,FréquentLinqSyntaxe ou méthode d'extension.
2.Reporter la requête
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();
La sortie reste constante entre les itérations , Mais les valeurs dans la collection ont changé .
边栏推荐
- Shell view help
- ROS1Noetic在Win11中安装记录
- Learn the specific technical learning experience of designing reusable software from the three levels of class, API and framework
- Psychological analysis of the safest spot Silver
- Does qiniu school belong to a securities company? Is it safe to open an account?
- How about precious metal spot silver?
- How about China International Futures Co., Ltd.? Is it a regular futures company? Is it safe to open an account online?
- Introduction to the unique variable reading and writing function of Kunlun distributed database
- 层次选择器
- 股票在哪个平台买比较安全呢?
猜你喜欢

Analysis on the wallet system architecture of Baidu trading platform

cadence SPB17.4 - 中文UI设置

SAP ui5 application development tutorial 102 - detailed explanation of the print function of SAP ui5 applications

Using geTx to build a more elegant structure of flutter pages

权限想要细化到按钮,怎么做?

初学者如何快速入门深度学习?

Database daily question - day 20: selling products by date

【机器学习-西瓜书】更文挑战【Day1】:1.1 引言
3 big questions! Redis cache exceptions and handling scheme summary

How to calculate the position of gold ETF
随机推荐
SAP ui5 application development tutorial 103 - how to consume the trial version of the third-party library in SAP ui5 applications
[UVM] don't say that your VIP can't use ral model
打新债属于什么理财产品?
Explain the startup process of opengauss multithreading architecture in detail
Voice network multiplayer video recording and synthesis support offline re recording | Nuggets technology solicitation
Why do we not use foreign keys now (2)?
ROS1Noetic在Win11中安装记录
3 big questions! Redis cache exceptions and handling scheme summary
What is the storage structure and mode of data in the database?
flowable 全局监听 监听流程的启动和流程的结束
SAP MM 事务代码VL04为STO创建外向交货单
Mysql8.0 easily completes gtid master-slave replication
What financial product does the new bond belong to?
I've been outsourcing for four years, but I feel it's useless
Cadence spb17.4 - Chinese UI settings
Because I said: volatile is a lightweight synchronized, the interviewer asked me to go back and wait for the notice!
Yyds dry inventory solution sword finger offer: print the binary tree into multiple lines
OSPF综合实验
How about China International Futures Co., Ltd.? Is it a regular futures company? Is it safe to open an account online?
Which platform is safer to buy stocks on?