摘要: C# .net 多线程中集合数据同步(转) 集合类通常不是线程安全的,多个阅读器可以安全的读取集合.但是对集合的任何修改都将为访问集合的所有线程生成不明确的结果.使用以下任何方法都可以令集合类是线程安全的 (1) 使用Synchronized 方法,则从该类派生包装,并通过该包装以独占方式访问集合 阅读全文
posted @ 2017-08-23 13:51 c#菜鸟之行 阅读(851) 评论(0) 推荐(0) 编辑
摘要: {00000000-0000-0000-C000-000000000046}: IUnknown{00000001-0000-0000-C000-000000000046}: IClassFactory{00000002-0000-0000-C000-000000000046}: IMalloc{0 阅读全文
posted @ 2017-05-22 12:10 c#菜鸟之行 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/pengxl/p/3967040.html 阅读全文
posted @ 2017-05-06 14:32 c#菜鸟之行 阅读(172) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/yuangang/p/5466068.html 阅读全文
posted @ 2017-04-13 16:28 c#菜鸟之行 阅读(240) 评论(0) 推荐(0) 编辑
摘要: int number = 1;string str = number.ToString().PadLeft(2,'0');//数字转化成2位字符串,不足在前面补”0“ 阅读全文
posted @ 2017-04-13 15:28 c#菜鸟之行 阅读(1885) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/xiaofengfeng/p/4729973.html C#中的Math.Round()并不是使用的"四舍五入"法。其实在VB、VBScript、C#、J#、T-SQL中Round函数都是采用Banker's rounding(银行家算法),即:四舍六入 阅读全文
posted @ 2017-04-13 13:59 c#菜鸟之行 阅读(549) 评论(0) 推荐(0) 编辑
摘要: #region [颜色:16进制转成RGB] /// <summary> /// [颜色:16进制转成RGB] /// </summary> /// <param name="strColor">设置16进制颜色 [返回RGB]</param> /// <returns></returns> pub 阅读全文
posted @ 2017-04-13 10:15 c#菜鸟之行 阅读(2118) 评论(0) 推荐(0) 编辑
摘要: [System.Runtime.InteropServices.DllImport("user32.dll")] static extern int PostMessageA(IntPtr h, int msg, int wp, int lp); void 文本_投递(IntPtr h,string str) { byte[] ... 阅读全文
posted @ 2017-03-25 14:15 c#菜鸟之行 阅读(2089) 评论(0) 推荐(0) 编辑
摘要: private void Form1_Load(object sender, EventArgs e) { this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.BackColor = Color.Red; th 阅读全文
posted @ 2017-03-24 22:31 c#菜鸟之行 阅读(2282) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/andrew_wx/article/details/6628501 阅读全文
posted @ 2017-03-22 09:02 c#菜鸟之行 阅读(7314) 评论(0) 推荐(0) 编辑