Fork me on GitHub
摘要: 对扩展方法的理解我想:就是给已有程序添加方法,但是这个由三个约束1、必须是静态类2、必须是静态fangfa3、方法中的第一个参数类型中必须有this关键字namespace 扩展方法{ class Program { static void Main(string[] args) { (new User() { Name = "张三", Age = 23, Pay = 1234 }).ShowInfo(); } } class User { public string Name {get... 阅读全文
posted @ 2013-09-16 18:37 种花生的读书人 阅读(212) 评论(0) 推荐(0)

该博客仅作为记录笔记,转载随意