摘要: private static Mutex m = new Mutex(); static bool p = true; public static void A() { while (true) { ... 阅读全文
posted @ 2015-06-28 14:13 nbu_djw 阅读(131) 评论(0) 推荐(0) 编辑
摘要: public delegate void del(); del d = Func; d.Invoke(); public static void Func() { Console.WriteLine("i am del... 阅读全文
posted @ 2015-06-26 21:08 nbu_djw 阅读(160) 评论(0) 推荐(0) 编辑
摘要: static object locker = new object(); public void A() { while (true) { lock (locker) ... 阅读全文
posted @ 2015-06-26 20:10 nbu_djw 阅读(109) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { //控制台默认输出行数是300,可以设置 Console.BufferHeight = 1000; ... 阅读全文
posted @ 2015-06-26 13:22 nbu_djw 阅读(249) 评论(0) 推荐(0) 编辑
摘要: [ValidateInput(false)]或 阅读全文
posted @ 2015-06-25 21:49 nbu_djw 阅读(2977) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); ... 阅读全文
posted @ 2015-05-21 13:49 nbu_djw 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 服务器端Socket socketWatch = null; Thread threadWatch = null; Dictionary dicSocket = new Dictionary(); Dictionary dicThread = new Dic... 阅读全文
posted @ 2015-05-20 09:41 nbu_djw 阅读(276) 评论(0) 推荐(0) 编辑
摘要: public static void WriteStringToFile(string FilePath, string Contend) { FileInfo fi = new FileInfo(FilePath); if (!fi.Di... 阅读全文
posted @ 2015-05-15 20:18 nbu_djw 阅读(354) 评论(0) 推荐(0) 编辑
摘要: public static void Compress(string sourceFile, string destFile) { FileStream fs = File.OpenRead(sourceFile); byte[] bs = ... 阅读全文
posted @ 2015-05-15 11:13 nbu_djw 阅读(117) 评论(0) 推荐(0) 编辑
摘要: id是int类型自增主键,如果要模糊查询要用触发器,自动生成一个字符类型, IDENT_CURRENT或者当前表的种子用存储过程修改种子成为我们想要的自动编号 阅读全文
posted @ 2014-10-24 14:20 nbu_djw 阅读(198) 评论(0) 推荐(0) 编辑