摘要: 恢复内容开始 Object Student = new { Id = "1", Name = "张三" }; //Console.WriteLine(Student.Id); //Console.WriteLine(Student, Name); //C#强类型语言,编译时会确定类型,object 阅读全文
posted @ 2019-11-09 14:44 王大师123 阅读(348) 评论(0) 推荐(0) 编辑
摘要: // 1 事件和委托的区别 // 2 简单的例子 class Program { static void Main(string[] args) { { Cat cat = new Cat(); cat.CatMiaoAction += new Dog().Wang; cat.CatMiaoActi 阅读全文
posted @ 2019-11-07 14:12 王大师123 阅读(142) 评论(0) 推荐(0) 编辑
摘要: // 1 泛型委托--Func Action // 2 Func Action 异步多线程 class Program { static void Main(string[] args) { MyDelegate myDelegate = new MyDelegate(); myDelegate.Show(); Console.ReadKey(); } } class MyDelegate { p 阅读全文
posted @ 2019-10-25 22:06 王大师123 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: // 1 委托的声明、实例化和调用 // 2 委托的意义:解耦 class Program { static void Main(string[] args) { MyDelegateEvent delegateEvent = new MyDelegateEvent(); delegateEvent.Show(); Student student = new Student(); student. 阅读全文
posted @ 2019-10-25 14:49 王大师123 阅读(1873) 评论(0) 推荐(0) 编辑