摘要: Reflection 阅读全文
posted @ 2019-12-31 18:12 wesson2019 阅读(320) 评论(0) 推荐(0) 编辑
摘要: public static class TaskAsyncHelper { /// <summary> /// 将一个方法action异步运行,在执行完毕时执行回调callback /// </summary> /// <param name="action">异步方法,该方法没有参数,返回类型必须 阅读全文
posted @ 2019-12-31 18:11 wesson2019 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 深复制 阅读全文
posted @ 2019-12-31 18:09 wesson2019 阅读(953) 评论(2) 推荐(6) 编辑
摘要: OnUIThread 阅读全文
posted @ 2019-12-31 18:08 wesson2019 阅读(503) 评论(0) 推荐(1) 编辑
摘要: Enum 扩展 阅读全文
posted @ 2019-12-31 18:07 wesson2019 阅读(147) 评论(0) 推荐(0) 编辑
摘要: System.Threading.ReaderWriterLockSlim,该类用于管理资源访问的锁定状态,可实现多线程读取或进行独占式写入访问。可以避免在同一时间段内多线程同时写入一个文件而导致的并发写入问题。 /// <summary> /// 读写锁,当资源处于写入模式时,其他线程写入需要等待 阅读全文
posted @ 2019-12-31 18:06 wesson2019 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Windows编程中不建议创建进程(进程创建的开销不容忽视),若需要大量创建进程,最好切换到Linux系统; Windows偏向多线程,大量面对资源争抢与同步的问题。 在面向多核的服务器端编程中,需要习惯多进程而非多线程。(在CPU多核情况下,多线程在性能上不如多进程);Linux偏向进程间通信的方 阅读全文
posted @ 2019-12-31 18:05 wesson2019 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 这些信息有助于跟踪、调试和创建诊断工具。 if the call site doesn't provide the argument, the compiler will use the current file, line number, or member name to fill in the 阅读全文
posted @ 2019-12-02 18:06 wesson2019 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 实时、刷新、更新 阅读全文
posted @ 2019-12-02 17:15 wesson2019 阅读(194) 评论(0) 推荐(0) 编辑
摘要: RandomElement 阅读全文
posted @ 2019-12-02 16:42 wesson2019 阅读(576) 评论(0) 推荐(0) 编辑