KimhillZhang |
|
||
2013年4月10日
摘要:
贴一个简单的代码1:多线程public class Class1 { public Class1() { Timer timer = new Timer(); timer.Enabled = true; timer.Interval = 500; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); Console.Read(); } int n = 0; void timer_Elapsed(object sender, ElapsedEventArgs e) { n++; System.Threading.Thread t = n 阅读全文
|
Copyright © 2024 KimhillZhang
Powered by .NET 9.0 on Kubernetes |