namespace ConsoleApp4 { class Program { static void Main(string[] args) { Mum mum = new Mum(); Dad dad = new Dad(); Son son = new Son(); Sister sister = new Sister(); mum.TellEat(); mum.EatDel += son.SonEat; mum.EatDel += dad.DadEat; mum.EatDel += si…
C#6.0新添加了 lambda的强力支持,用lambda的确可以节省好多代码,让代码看起来更简洁,更直观: 这里做一个笔记,C#的匿名委托 Demo class Program { static void Main(string[] args) { List<tb_User> list = new List<tb_User>{ , Name = }, , Name = }, , Name = }, , Name = }, , Name = }, , Name = }, , Nam…