zoukankan
html css js c++ java
Linq Coding Part One
Linq Search Process
Linq To ArrayList
public
class
Student
{
public
String FirstName
{
get
;
set
; }
public
String LastName
{
get
;
set
; }
public
Int32[] Scores
{
get
;
set
; }
}
public
class
LinqToArrayList : Interface
{
Interface Members
#region
Interface Members
public
void
invoke()
{
ArrayList arrList
=
new
ArrayList();
arrList.Add(
new
Student
{
FirstName
=
"
Svetlana
"
,
LastName
=
"
Omelchenko
"
,
Scores
=
new
int
[]
{
98
,
92
,
81
,
60
}
}
);
arrList.Add(
new
Student
{
FirstName
=
"
Claire
"
,
LastName
=
"
O’Donnell
"
,
Scores
=
new
int
[]
{
75
,
84
,
91
,
39
}
}
);
arrList.Add(
new
Student
{
FirstName
=
"
Sven
"
,
LastName
=
"
Mortensen
"
,
Scores
=
new
int
[]
{
88
,
94
,
65
,
91
}
}
);
arrList.Add(
new
Student
{
FirstName
=
"
Cesar
"
,
LastName
=
"
Garcia
"
,
Scores
=
new
int
[]
{
97
,
89
,
85
,
82
}
}
);
var query
=
from Student student
in
arrList
where
student.Scores[
0
]
>
95
select student;
foreach
(Student s
in
query)
Console.WriteLine(s.LastName
+
"
:
"
+
s.Scores[
0
]);
Console.WriteLine(
"
press any key to exit.
"
);
Console.ReadKey();
}
#endregion
}
LINQ Coding 目录
Linq Coding -- Part One
Linq Coding -- Part Two[标准查询运算符]
Linq Coding -- Part Three [Let子句]
Linq Coding -- Part Four[Concat应用]
Linq Coding -- Part Five (Join之内部联接查询)
Linq Coding -- Part Six (Join之分组联接)
Linq Coding -- Part Seven (Join之左外部联接、DefaultIfEmpty、GroupJoin)
查看全文
相关阅读:
centos出现“FirewallD is not running”怎么办
Centos7开放及查看端口
phpRedis函数使用总结
如何在Windows的PHPstudy中使用redis
Redis命令操作详解
不可不知 DDoS的攻击原理与防御方法
DDoS 攻击与防御:从原理到实践
ORM Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous
PHP常用函数大全500+
Linux彻底卸载Nginx
原文地址:https://www.cnblogs.com/RuiLei/p/1081882.html
最新文章
windows查看端口被占用情况
Windows环境下设置Tomcat8以服务的形式运行,不再打开Tomcat窗口
MySql添加字段命令
Java中String、LocalDateTime、LocalDate、Date互转
Windows10安装Redis过程
修改Tomcat启动窗口的名称(Title)
Idea中,项目文件右键菜单没有svn选项处理办法
Spring boot jpa 设定MySQL数据库的自增ID主键值
MySQL 日期格式化,取年月日等相关操作
一个Tomcat下部署多个项目异常:org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean 的解决方法
热门文章
Python基础 — 面向对象编程基础
Docker详解(三)— 镜像和容器卷
Python基础 — 字符串和常用数据结构
Python基础 — 函数
Python基础 — 分支和循环
Python基础 — 变量和运算符
Python基础 — Python简介
Docker详解(二)— 常用操作命令
Docker详解(一)— 入门
JWT详解
Copyright © 2011-2022 走看看