2013年5月3日

摘要: 这是这段时间学习设计模式的时候的源代码。单例(单件)模式的五种实现。通过一个计数器的例子调用验证一下。把下面的代码直接拷进vs下,运行就可以了。(控制台应用程序)[csharp]usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Threading;namespaceNetFarmwork{classNetFarmwork{staticvoidMain(string[]args){Threadthread0=Thread.CurrentThread;thread0.Name="Thread0 阅读全文

posted @ 2013-05-03 21:05 yfldj 阅读(244) 评论(0) 推荐(0)


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3