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)
查看全文
相关阅读:
个人项目 源程序特征统计程序(C++)
自我介绍+软工五问
团队作业3——需求改进&系统设计
Four Fundamental Operations(JS) --结对项目
WordCount of Software Engineering
代码开发、测试发布
需求改进---系统设计
综合系统开发---需求分析
读书笔记---软件设计原则、设计模式
自我介绍+课程六问
原文地址:https://www.cnblogs.com/RuiLei/p/1081882.html
最新文章
第一次作业
第一次作业
第一次作业
第一次作业
第一次作业
第一个作业
第一次作业
2019 SDN上机第2次作业
2019 SDN上机第1次作业
C语言I博客作业11
热门文章
C语言I博客作业10
C语言I博客作业11
C语言I博客作业10
记Android中 Activity 和Service几个坑
java获取IP为 0:0:0:0:0:0:0:1 解决办法
团队作业4:项目冲刺集合贴(银河超级无敌舰队)
团队作业3 需求改进&系统设计(银河超级无敌舰队)
团队作业2-《需求规格说明书》
团队作业1——团队展示&选题(银河超级无敌舰队)
结对项目 实现自动生成四则运算题目的程序 (C++)
Copyright © 2011-2022 走看看