08 2019 档案
摘要://using _2_命名空间和程序集.WidgetA; //using _2_命名空间和程序集.WidgetB; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WidgetA = _2_命名空间和程序
阅读全文
摘要:class Program { static void Main(string[] args) { //1、类型转换 { //隐式转换:不需要转型,因为new返回一个Employee对象,而Object是Employee的基类型 object o = new Employee(); //显示转换:需要转型,因为Employee派生自Object Employee employee = (Emplo
阅读全文
摘要:通过运行结果时间可以看出: 未使用迭代器,等待“WhereNoYield”函数运算完成后,再进行打印数据 使用迭代器,每次执行“WhereWithYield“函数时,会直接打印数据
阅读全文
摘要:一、我们先看下C#代码下Lamdba表达式的写法 二、再通过反编译工具查看 三、下面我们来看一组对比图,就非常容易的看出来了 由此我们得出的结论:编译器将lambda表达式生成一个类种类,每个lamdda也会生成一个独立的方法,然后绑定到委托的实例,所谓的lamdba表达式其实只是一个“语法糖”。
阅读全文
摘要:/// <summary> /// 爬虫委托 /// </summary> /// <param name="crawlerCode">爬虫编码</param> delegate void CrawlerDelegate(string crawlerCode); class Program { static void Main(string[] args) { { //.net framework
阅读全文