摘要:
位于 System.Threading.Tasks.TaskContinuationOptions Thread是基于操作系统级别的线程,而ThreadPool和Task不会创建自己的操作系统线程,二者是由任务调度器(TaskScheduler)执行,默认的调度程序仅仅在ThreadPool上运行。 阅读全文
摘要:
假设有一个异步方法taskDo,返回一个Task类型。当我们用任务执行该异步方法,且需等待该方法执行完成时,应该如何创建任务呢??? static void WriteLine(object line) { Console.WriteLine(DateTime.Now.ToString("mm:ss 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; static class ExtensionMethod { public static IEnumerable<T> Random<T>(this IEnumera 阅读全文
摘要:
先看两张图,一个实现自己的效果,一个使用默认的效果: GitHub地址 https://github.com/Bridge2018/WPF-DataGridhttps://github.com/Bridge2018/WPF-DataGrid 不多说,上代码。。。 1.转换器 因为里面有个DateTi 阅读全文
摘要:
资源初步认识https://blog.csdn.net/breakbridge/article/details/116271634 一、资源键 大多少时候我们定义一个资源都是将其Key设置为一个字符串,但有时候我们也可以将Key设置为 ComponentResourceKey 对象。 <Applic 阅读全文