12 2020 档案

摘要:C#多线程Thread Thread .net framework1.0提出的。Thread:是C#对计算机资源线程操作的一个封装类 启动线程的几种方式 可以通过提供委托来启动线程,该委托表示线程在其类构造函数中执行的方法。 然后调用 Start方法开始执行。 线程执行的方法无参数 如果该方法没有参 阅读全文
posted @ 2020-12-27 15:46 liweiyin 阅读(538) 评论(0) 推荐(0) 编辑
摘要:Invoke同步(按顺序)与BeginInvoke异步(无序) Invoke 在拥有此控件的基础窗口句柄的线程上执行委托,同步的。 BeginInvoke 在创建控件的基础句柄所在线程上异步执行委托。 如下所示: /// <summary> /// 同步方法:发起调用,代码按照顺序逐行执行。 有顺序 阅读全文
posted @ 2020-12-25 21:09 liweiyin 阅读(2775) 评论(0) 推荐(0) 编辑
摘要:Lambda的前世今生 在C#2.0之前,当我们执行委托绑定的方法时,具体如下所示: public class LambdaDemo { //public delegate void NoReturnNoParam(); public delegate void NoReturnWithParam( 阅读全文
posted @ 2020-12-10 17:32 liweiyin 阅读(261) 评论(0) 推荐(0) 编辑
摘要:当使用VC自带的STL string append进行字符串拼接操作的时候,如下所示: // demo.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostrea 阅读全文
posted @ 2020-12-06 22:30 liweiyin 阅读(259) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示