摘要: 需求说明 当点击父窗体的按钮时,父窗体的文本框中的内容显示在子窗体的label 中 以下是控件名称: 父窗体文本框: txtMsg 按钮:button1 子窗体label:lblMsg 方式一 在子窗体 frmChildren 中定义如下方法,提供子窗体label控件 Text 属性的设置 publ 阅读全文
posted @ 2022-10-12 17:30 沈先生爱猫咪 阅读(56) 评论(0) 推荐(0) 编辑
摘要: linq 的本质是扩展方法和委托的结合 链式 linq 和 方法级linq List<int> list = new List<int>() { 3,9,32,7 }; // linq 分为链式 和方法级linq //链式的写法如下 var q = from temp in list where t 阅读全文
posted @ 2022-10-12 14:22 沈先生爱猫咪 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 总结lambda表达式的本质就是匿名方法,根据委托推断类型 class Program { static void Main(string[] args) { //泛型委托 最后一个是返回值 Action 委托是无返回值的 Func<int, int, int> func = new Func<in 阅读全文
posted @ 2022-10-12 11:28 沈先生爱猫咪 阅读(44) 评论(1) 推荐(0) 编辑