https://msdn.microsoft.com/zh-cn/library/wewwczdw(v=vs.110).aspx Applications that perform many tasks simultaneously, yet remain responsive to user interaction, often require a design that uses multiple threads. 同时执行多项任务,并且仍要相应用户交互的应用,通常需要一个使用多线程的设计.…
using System; using System.Threading; using System.Threading.Tasks; using static System.Console; //异步编程 //1.异步模式 //2.基于事件的异步模式 //3.基于任务的异步模式 namespace ConsoleApp { class Program { public static void TaskMethod(object o) { Log(o?.ToString()); } privat…