天使半只翼

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年12月31日

摘要: 一、Linq有两种语法:1、 方法语法2、 查询语法下面举个例子看看这两种方法的区别比如现在有一个学生类public class student{ public string username { get; set; } public int age { get; set; } public string sex { get; set; }}我们通过一个方法来添加很多同学public IList<student> GetStu(int n) { IList<student> stuList = new List<student>(); for (int i 阅读全文
posted @ 2012-12-31 11:23 天使半只翼 阅读(164) 评论(0) 推荐(0) 编辑