随笔分类 -  C#

摘要:using System.Runtime.Serialization;using System.Runtime.Serialization.Formatters;using System.Runtime.Serialization.Formatters.Binary;public byte[] ObjectToBytes(object obj) { using (MemoryStream ms = new MemoryStream()) { IFormatter formatter = new BinaryFormatter(); formatter.Serialize(ms, obj); r 阅读全文
posted @ 2011-08-11 15:51 咸鱼公子 阅读(336) 评论(0) 推荐(0)
摘要:Microsoft Visual Studio 2008 快捷键大全Ctrl+m+Crtr+o折叠所有大纲Ctrl+M+Crtr+P: 停止大纲显示Ctrl+K+Crtr+C: 注释选定内容Ctrl+K+Crtr+U: 取消选定注释内容Ctrl+J : 列出成员 智能感知Shift+Alt+Enter: 切换全屏编辑Ctrl+B,T / Ctrl+K,K: 切换书签开关Ctrl+B,N / Ctrl+K,N: 移动到下一书签Ctrl+B,P: 移动到上一书签Ctrl+B,C: 清除全部标签Ctrl+I: 渐进式搜索Ctrl+Shift+I: 反向渐进式搜索Ctrl+F: 查找Ctrl+Shif 阅读全文
posted @ 2011-08-05 10:46 咸鱼公子 阅读(483) 评论(0) 推荐(0)
摘要:第一步:在http://code.google.com/p/dblinq2007/downloads/list上下载DbLinq2007,将 DbLinq.dll、DbLinq.Sqlite.dll、System.Data.SQLite.dll、 System.Data.SQLite.Linq.dll 四个文件引入到项目中。第二步:在cmd中执行DbMetal.exe,根据帮助提示信息输入数据库配置。举例:DbMetal.exe -c "DbLinqProvider=Sqlite;data source=test.db" --provider=Sqlite --databa 阅读全文
posted @ 2011-07-22 16:13 咸鱼公子 阅读(1815) 评论(1) 推荐(1)
摘要:#region DataTableToObjList /// <summary> /// DataTable数据转成Entity /// </summary> /// <typeparam name="T">Entity</typeparam> /// <param name="ds">数据集</param> /// <param name="tbName">表名</param> /// <returns></return 阅读全文
posted @ 2011-07-13 16:04 咸鱼公子 阅读(1400) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2011-05-04 10:57 咸鱼公子 阅读(31) 评论(1) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2011-04-07 20:06 咸鱼公子 阅读(31) 评论(0) 推荐(0)
摘要:房租涨涨了电话小了感觉越来越苦假期少了收入差了工作越来越苦商品精了价格涨了心情越来越苦天更白了水更污了环境越来越差哎......越来越 来...... 越来越苦来......活得有奔头人会步步高想做到你要努力去做到越来越好 来......越来越好 来......越来越好 来......幸福的笑容天天挂眉梢越来越好婆媳和了家庭暖了生活越来越好孩子高了懂事多了学习越来越好朋友多了心相通了大家越来越好道路宽了心气顺了日子越来越好哎.......越来越好来......越来越好来......活的有精神人就不显老该得到你就争取要得到越来越好 来......越来越好 来......越来越好 来......幸 阅读全文
posted @ 2011-03-24 16:19 咸鱼公子 阅读(359) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2011-03-21 15:59 咸鱼公子 阅读(5) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/Nina-piaoye/archive/2011/01/20/1939815.html 阅读全文
posted @ 2011-03-14 15:39 咸鱼公子 阅读(236) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2011-03-11 10:16 咸鱼公子 阅读(9) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2011-03-10 11:16 咸鱼公子 阅读(10) 评论(0) 推荐(0)
摘要://转FLVpublic static string VideoConvertFlv(string FromName, string WidthAndHeight, string ExportName) { string ffmpeg = HttpContext.Current.Server.MapPath("~/FLV/ffmpeg.exe"); string Command =" -i " + FromName + " -y -ab 56 -ar 22050 -b 500 -r 15 -s " + WidthAndHeight + " "+ ExportName; //Flv格式 //s 阅读全文
posted @ 2011-01-20 17:26 咸鱼公子 阅读(893) 评论(0) 推荐(0)
摘要:如果DataFormatString无效,请添加属性HtmlEncode = "false"---------------------------------------设定BoundField的DataFormatString,通常有以下几种 DataFormatString= "{0:C}" 货币,货币的格式取决于当前Thread中Culture的设置 DataFormatString= "{0:E}" 科学计数法 DataFormatString= "{0: P}" 百分比 DataFormatString= "{0:F?}" 小数点后几位 DataFormatString= "{0:d 阅读全文
posted @ 2010-12-16 11:48 咸鱼公子 阅读(372) 评论(0) 推荐(0)
摘要:1.在解决方案中添加一个新项目(类库:JSControl)2.在新项目中添加要用的JS脚本(JScript1.js)脚本的内容:function testAlert() { alert("Hello!");}3.右键点击JScript1.js,使Build Action为Embedded Resource(也就是右击属性:将生成操作改为"嵌入的资源")4.在JSControl项目的Assembly... 阅读全文
posted @ 2010-09-06 16:51 咸鱼公子 阅读(454) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1.首先我会检查一下服务器配置,重新配置一次服务器安全,可以参考http://hi.baidu.com/zzxap/blog/item/18180000ff921516738b6564.html2.其... 阅读全文
posted @ 2010-09-06 15:49 咸鱼公子 阅读(138) 评论(0) 推荐(0)
摘要:研究window服务,这文章不错!讲得也不错...最近项目中用到window服务程序,以前没接触过,比较陌生,花了两天的时间学习了下,写了个简单的服务,但在制作安装程序的时候,参照网上很多资料,却都制作不成功,可能是开发环境或项目配置的不同,这里把自己成功制作的方式贴出来,一方面留给自己,一方面也希望能给遇到同样问题绝望中不能自拔、以致失去灵魂的路人甲,路人乙一还魂丹 . . . IDE :WIN... 阅读全文
posted @ 2010-09-06 11:22 咸鱼公子 阅读(442) 评论(0) 推荐(0)
摘要:我以前常用:IDictionary<string,string> iDict和IList<FileInfo> dirList但是后来有高手说了要用hashtable据说性能比前两者好,那以后就用这hashtable吧呵呵,跟着大部队走...hashtable听起来也牛一些,就像人们比较:.net和JAVA的时候,人们往往都会说JAVA好,事事上JAVA工资也比.net高代码... 阅读全文
posted @ 2010-09-06 11:04 咸鱼公子 阅读(928) 评论(0) 推荐(0)
摘要:Textbox回事件keychar//表示控下健的对应的字符代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--textbox有一个keypress事件,当触发的时候该事件对应的ASCII代码是:13[代码]验证TextBox中是不是数字e.handl... 阅读全文
posted @ 2010-08-03 13:20 咸鱼公子 阅读(195) 评论(0) 推荐(0)
摘要:第一种办法新建一个bat批处理文件输入: net stop sqlserveragent   net stop mssqlserver  net start mssqlserver  net start sqlserveragent然后添加在windows任务里,这样每都都会定时重启服务第二种待我去证实:停止 Process.Start( "net stop MSSQLSERVER "); 如果是... 阅读全文
posted @ 2010-07-21 16:05 咸鱼公子 阅读(554) 评论(0) 推荐(0)
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1usingSystem;2usingSystem.Collections.Generic;3usingSystem.ComponentModel;4usingSystem.Data;5usingS... 阅读全文
posted @ 2010-07-15 08:38 咸鱼公子 阅读(342) 评论(0) 推荐(0)