首先,创建一个这样的界面。 其次,我们弄个名字为Student的实体类.并在实体类里面弄个静态方法用于模拟数据。 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 ...
首先,创建一个这样的界面。
其次,我们弄个名字为Student的实体类.并在实体类里面弄个静态方法用于模拟数据。
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace 搜索测试 8 { 9 public class Student10 {11 public int ID { get; set; }12 public string Name { get; set; }13 public int Age { get; set; }14 public double Height { get; set; } 15 16 //模拟数据17 public static IEnumerable<Student> GetStudentData()18 {19 20 for (int i = 1; i <= 12; i++)21 {22 yield return new Student { 23 ID=i,24 Name=string.Format("同学{0}号",i), 25 Age=i*10,26 Height=160+i27 };28 } 29 }30 }31 }
原标题:简谈回顾多条件搜索查询。(适用于新手,老鸟飘过)
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。