sportdog

导航

 
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页

2019年4月22日

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TestWeb { public partial class TestSerializeX... 阅读全文
posted @ 2019-04-22 15:41 sportdog 阅读(158) 评论(0) 推荐(0)
 

2018年11月27日

摘要: top数为变量时 declare @intTop intset @intTop=2print @intTop --set rowcount @intTop--select * from [dbo].[Demo_Values]select top @intTop * from [dbo].[Demo_ 阅读全文
posted @ 2018-11-27 10:45 sportdog 阅读(126) 评论(0) 推荐(0)
 

2018年9月13日

摘要: 直接在子线程中调用方法,线程的ID为3,通过Post则为1 执行结果: 2018-09-13 11:21:11:1735 : 主线程:1 2018-09-13 11:21:16:0583 : 子线程:3 2018-09-13 11:21:16:0739 : ShowForm:1发送失败! 2018- 阅读全文
posted @ 2018-09-13 11:24 sportdog 阅读(924) 评论(0) 推荐(0)
 

2018年9月12日

摘要: 其实还是主线程执行,再New了一个新线程,然后大家各干个的事了。 public delegate void Entrust(string str); static void Main(string[] args) { Entrust callback = new Entrust(ShowMesage 阅读全文
posted @ 2018-09-12 16:39 sportdog 阅读(931) 评论(1) 推荐(0)
 

2018年8月29日

摘要: 代码: BackgroundWorker bw = new BackgroundWorker(); public MainWindow() { InitializeComponent(); bw.WorkerReportsProgress = true; bw.WorkerSupportsCance 阅读全文
posted @ 2018-08-29 16:20 sportdog 阅读(136) 评论(0) 推荐(0)
 

2018年8月28日

摘要: 代码: static void Main(string[] args) { BackgroundWorker bw = new BackgroundWorker(); bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = t 阅读全文
posted @ 2018-08-28 15:09 sportdog 阅读(141) 评论(0) 推荐(0)
 

2018年8月27日

摘要: static System.Threading.Timer timer; static void Main(string[] args) { Console.WriteLine("Press Enter key to stop timer"); DateTime start = DateTime.Now; ... 阅读全文
posted @ 2018-08-27 15:09 sportdog 阅读(636) 评论(0) 推荐(0)
 

2018年8月24日

摘要: Main 程序[分别调用三个方法] static void Main(string[] args) { using (CancellationTokenSource cts = new CancellationTokenSource()) { CancellationToken token = ct 阅读全文
posted @ 2018-08-24 14:22 sportdog 阅读(262) 评论(0) 推荐(0)
 
摘要: const int intNumber = 500; static void Main(string[] args) { Stopwatch sw = new Stopwatch(); sw.Start(); UseThreads(intNumber); sw... 阅读全文
posted @ 2018-08-24 10:21 sportdog 阅读(444) 评论(1) 推荐(0)
 

2018年8月20日

摘要: 案例一 举一个例子,设计模式中的单例模式,记得当时做机房收费系统的时候就用的单例模式防止一个界面被实例多次,而Mutex对象能达到同样的效果,防止界面被实例化多次,起到控制线程的作用。 案例二 如果大家还是不太理解,举一个更简单的例子就是把Mutex看做一个出租车,乘客看做线程。乘客首先等车,然后上 阅读全文
posted @ 2018-08-20 14:46 sportdog 阅读(138) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页