-
C# 泛型列表List用法示例
C# 泛型列表List用法示例,从给出的人员名单中,过滤人员名称中以"科"结束的序列,遍历查询结果。
private void Frm_Main_Load(object sender, EventArgs e)
{
List People = new List{//创建人员列表
new Person(1,"王*科"),
new Person(2,"王*科"),
new Person(3,"赵*东")};
var query = from p in People//过滤人员名称中以"科"结束的序列
where p.Name.EndsWith("科")
select new
{
人员ID = p.ID,
人员姓名 = p.Name
};
foreach (var item in query)//遍历查询结果
{
label1.Text += item + "
";
}
}
}
public class Person
{
public Person(int id, string name)
{
this.ID = id;
this.Name = name;
}
public int ID { get; set; }//人员ID
public string Name { get; set; }//人员姓名
}
- 2023-01-08 20:45:03下载
- 积分:1
-
Stepper-motor-control-program
步进电机matlab控制程序,实现对步进电机的控制,并让它可向正负方向移动指定的距离。(Matlab stepper motor control procedures, the stepper motor control, and you can move a specified distance in the negative direction.)
- 2016-10-17 09:06:30下载
- 积分:1
-
随机森林
说明: 随机森林matlab工具箱,可以实现分类和回归(Randomforest Tool Box)
- 2020-07-14 15:47:03下载
- 积分:1
-
kalman (2)
说明: 使用卡尔曼滤波器对目标跟踪、滤波,实现目标的跟踪定位(Kalman filter for target tracking)
- 2020-12-28 09:07:58下载
- 积分:1
-
l04_microprog
MIT公开课程计算机体系结构 第四课MIT公开课程计算机体系结构 第四课(MIT公开课程计算机体系结构 第四课)
- 2010-06-28 20:01:16下载
- 积分:1
-
这是C语言源代码的
井字游戏。
C est le code source en langage C du jeu du morpion.
Une "intelligence artificiel" est programmée.
- 2023-05-14 12:35:03下载
- 积分:1
-
WinDriver9.0安装包。它支持windows XP/2000/98,Linux/WindowsCE.
WinDriver9.0安装包。它支持windows XP/2000/98,Linux/WindowsCE.-WinDriver9.0 installation package. It supports windows XP/2000/98, Linux/WindowsCE.
- 2022-02-24 23:21:29下载
- 积分:1
-
VUALL8-500
ABAQUS显式子程序用来计算材料是否破坏和对应刚度折减。(ABAQUE/Explicit subroutine vumat)
- 2020-10-26 14:29:59下载
- 积分:1
-
28379 PWM
说明: 芯片为TMS320F28379D,程序包括上计数模式,上下计数模式,死区,错误(The chip is TMS320F28379D. The program includes upper counting mode, upper and lower counting mode, dead zone and error.)
- 2019-05-22 11:07:04下载
- 积分:1
-
一个不错的网上购物系统的源代码
一个不错的网上购物系统的源代码 -a good online shopping system source code a good online shopping system source code
- 2022-03-20 11:54:33下载
- 积分:1