Lambda表达式对List的处理
Lambda表达式使得List的过滤和排序更加简洁!
定义一个Employee类:
1: public class Employee 2: { 3: public string FirstName {set; get;} 4: public string LastName {set; get;} 5: public decimal Salary {set; get;} 6: public bool IsManager {set; get;} 7: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ [...]
浙公网安备 33010602011771号