使用委托进行异步操作,处理一些耗时操作,防止主线程阻塞 使用例子: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Demo { class Program { static void Main(string[] args) { Func<string> fun = new Func<string>(Test); Console.Write
1.定义委托: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; namespace DelegateWebApp { /// <summary> /// 定义委托 /// </summary> /// <param name="i"></param> /// <param nam