一、异步编程的核心:委托 private int Task1(int num){//延迟5S,模拟长时间的操作System.Threading.Thread.Sleep(5000);return num * num;}private int Task2(int num){return num * num;}1、同步执行任务
/// <summary>
/// 同步执行任务
/// …
配置文件的读取
在AutoCAD插件开发中,可能需要生成、修改、读取配置文件中一些参数或设置。JSON格式的配置文件易于编写和修改,且可以方便地反序列化为对象进行使用。
运行后效果如下
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.Au…