上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 运用Linq,将List 转换为 Dictionary即:List ToDictionary废话不说,看代码:示例代码:按照性别分类class Program { public class Student { public string Name { get; set; } public int Age { get; set; } public int Sex { get; set; } } static void Main(string[] args... 阅读全文
posted @ 2013-08-29 10:29 cnkker.com 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: static DateTime pay_end(DateTime cur_date){DateTime start_date = DateTime.Parse("1999-05-03"); int time_diff = (cur_date - start_date).Days; int pay_periods = (int)(time_diff / 14.0D); if (Math.Ceiling(time_diff / 14.0D) == 0)return start_date.AddDays(pay_periods * 14); return start_date.A 阅读全文
posted @ 2013-08-07 16:08 cnkker.com 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 运用linq查找所有重复的元素 阅读全文
posted @ 2013-07-25 14:00 cnkker.com 阅读(443) 评论(1) 推荐(0) 编辑
摘要: 什么是Keep-Alive模式? 我们知道HTTP协议采用“请求-应答”模式,当使用普通模式,即非KeepAlive模式时,每个请求/应答客户和服务器都要新建一个连接,完成 之后立即断开连接(HTTP协议为无连接的协议);当使用Keep-Alive模式(又称持久连接、连接重用)时,Keep-Alive功能使客户端到服 务器端的连接持续有效,当出现对服务器的后继请求时,Keep-Alive功能避免了建立或者重新建立连接。 http 1.0中默认是关闭的,需要在http头加入"Connection: Keep-Alive",才能启用Keep-Alive;http 1.1中默认启用Keep-Alive,如果加入"Connection: close ",才关闭。目前大部分浏览器都是用http1.1协议,也就是说默认都会发起Keep-Alive的连接请求了,所以是否能完成一个完整的Keep- Alive连接就看服务器设置情况。 阅读全文
posted @ 2013-07-18 10:23 cnkker.com 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 测试中发现Double类型需要#0.00 小数点精度为后2位,并且多余部分不需要四舍五入,直接截断用字符串处理也可以,但是比较麻烦这里给出一种思路:double a = 9999.999;a = Math.Floor(a * 100) / 100;//取二位小数,9999.99Console.WriteLine(a); 阅读全文
posted @ 2013-06-27 14:27 cnkker.com 阅读(873) 评论(0) 推荐(1) 编辑
摘要: 本文主要快速教会初学者如何配置log4net,并且快速运用到实际项目中!节省时间,代码可以100%通过编译。 阅读全文
posted @ 2013-01-31 15:33 cnkker.com 阅读(511) 评论(0) 推荐(1) 编辑
摘要: EF Power Tool 参数错误 HRESULT:0x80070057 (E_INVALIDARG)) 解决办法从EF4.1开始引入了Code First的开发模式,并提供了工具Entity Framework Power Tool,用于从数据库生成Code First风格的代码。最近在使用这个工具的时候遇到一个参数错误(0×80070057)的问题:测试的过程中发现如果数据库不是本地的就会出这个错误。根据这条思路,从连接属性入手解决:点击高级,修改 Persist Security Info 为 True。测试OK转载:http://blog.bossma.cn/databas 阅读全文
posted @ 2012-11-15 16:47 cnkker.com 阅读(1314) 评论(5) 推荐(0) 编辑
摘要: WinForm 实现主程序(exe)与其关联类库(*.dll)分开存放开发环境:Microsoft Windows 7 SP1Microsoft.NET Framework 4.0 (x64)Microsoft Visual Studio 20101. 首先,App.config:<?xmlversion="1.0"encoding="utf-8"?><configuration><runtime><gcConcurrentenabled="true"/><assemblyBind 阅读全文
posted @ 2012-11-12 09:50 cnkker.com 阅读(414) 评论(0) 推荐(0) 编辑
摘要: Dotfuscator 5 注册码Dotfuscator Community Edition Registration ConfirmationThank you for registering your copy of Dotfuscator Community Edition.Your serial number is 21595Your Confirmation Number is 38500.The next time you run Dotfuscator, you will be prompted for this number.You can now access the sel 阅读全文
posted @ 2012-09-12 11:27 cnkker.com 阅读(846) 评论(0) 推荐(0) 编辑
摘要: 如何用委托与事件实现winfrom窗体之间值传递 阅读全文
posted @ 2012-09-09 00:23 cnkker.com 阅读(237) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页