登录
首页 » 其他 » C# 泛型列表List用法示例

C# 泛型列表List用法示例

于 2023-01-08 发布 文件大小:40.32 kB
0 191
下载积分: 2 下载次数: 1

代码说明:

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; }//人员姓名   }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • VC++写的注册表监控程序
    一款非常小巧好用的VC++注册表修改监控工具,可以监测注册表的内容是否被修改,可设置禁止修改的内容,还有很多功能请参见截图。当时是面向Windows2000写的,含驱动代码,现在公开了源代码,对了解Windows注册表是很不错的参考程序,值得一看。
    2023-01-13 08:00:04下载
    积分:1
  • C源码C程序常用公共符号定义头文件
    C源码C程序常用公共符号定义头文件-C source C procedures commonly used definition of the first public sign documents
    2022-04-20 11:34:53下载
    积分:1
  • This is VC++ Some of the shortcut keys, in the hope that useful
    这是VC++中的一些快捷键,希望对大家有用-This is VC++ Some of the shortcut keys, in the hope that useful
    2022-04-01 06:48:00下载
    积分:1
  • 内容和要求 1. 论述课题的性质、内容以及本次课程设计的目的和要求。 2. 说明系统对计算机软、硬件环境的基本要求,对Windows操作系统和VF6.0...
    内容和要求 1. 论述课题的性质、内容以及本次课程设计的目的和要求。 2. 说明系统对计算机软、硬件环境的基本要求,对Windows操作系统和VF6.0数据库管理系统简要的说明。 3. 总体设计方案的分析、比较和论证。 4. 数据库的建立,数据库中表的结构,各表中关键字的设置,表与表之间的关系。 5. 应用程序的菜单设计和界面设计,表单和报表的设计。 6. 编写代码、上机输入、调试、修改并运行通过。 7. 编写课程设计说明书。说明书是总结性的技术文件,应全面叙述整个设计的内容及过程(可参考上述6条),发现的问题及解决方法等。 8. 源代码和参考书目应作为说明书的附录。 9. 说明书应采用学校印刷的课程设计专用纸张,文字说明不少于6000字,数据库的总记录条数不少于100条。说明书中应包括系统结构示意图。 10.说明书一律横向装订,装订线在左侧。按目录、正文、 -a content and requirements. Discussed issues of the nature, content and design of the course the purpose and requirements. 2. Note to the computer system software and hardware environment, the basic requirements are that for Windows operating systems and database management systems VF6.0 briefly. 3. Design program analysis, comparison and verification. 4. The creation of the database, the database table structure, the keyword table settings, table and the relationship between the table. 5. Application procedures for the design and menu interface design, and the statements of the form d
    2022-02-01 20:45:24下载
    积分:1
  • 8m灯饰网站 美工一流,后台管理地址/admin.asp 密码自己看数据库...
    8m灯饰网站 美工一流,后台管理地址/admin.asp 密码自己看数据库-8m Lighting web site art class, Admin Address/admin.asp password to look up the database
    2023-02-21 11:55:04下载
    积分:1
  • 用于GIS(全球地理系统)的分析和处理的代码。
    用于GIS(全球地理系统)的分析和处理的代码。-For GIS (global geographic system) analysis and deal with the code.
    2022-02-21 03:45:59下载
    积分:1
  • 很有难度的一道题目,大家都来研究下,蛮有意思的,
    很有难度的一道题目,大家都来研究下,蛮有意思的,-Very difficult subject to work together, we all to study, the very interesting,
    2023-04-29 07:20:03下载
    积分:1
  • 基于Delphi的Access压缩程序
    界面相当漂亮的Delphi数据库压缩程序,本程序的压缩对象是 Access数据库,SQL版的暂后发布。通过本压缩程序,可自动清空Access中的无用数据,空数据行信息,减少Access体积,除了压缩功能外,本程序的界面也是一大亮点,是不是挺漂亮?
    2022-06-26 05:45:04下载
    积分:1
  • SVMmulticlass: Multi
    SVMmulticlass: Multi-class classification. Learns to predict one of k mutually exclusive classes. This is probably the simplest possible instance of SVMstruct and serves as a tutorial example of how to use the programming interface.
    2022-05-28 03:23:16下载
    积分:1
  • 此文章的算法有迭代法、穷举搜索法、递推法、贪婪法、回溯法、分治法、动态规划法等等,有用的的人可以...
    此文章的算法有迭代法、穷举搜索法、递推法、贪婪法、回溯法、分治法、动态规划法等等,有用的的人可以-This article has iteration of the algorithm, exhaustive search method, the recursive method, greedy method, backtracking, sub-rule method, dynamic programming, etc., can be useful
    2023-02-08 14:00:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载