随笔分类 -  C#

摘要:/*Converts List To DataTable*/ public static DataTable ToDataTable(IList data) { DataTable dataTable = new DataTable(typeof ... 阅读全文
posted @ 2015-05-15 15:52 等待是一生最初的苍老 阅读(782) 评论(0) 推荐(0) 编辑
摘要:虽然.NET已经是现实了Reverse(),但是学习算法有必要知道其是怎么实现的:private static void ReverseArray(int[] array) { int temp; int count = array.Leng... 阅读全文
posted @ 2014-05-28 16:04 等待是一生最初的苍老 阅读(223) 评论(0) 推荐(0) 编辑
摘要:LINQvar str= str.ToCharArray() .GroupBy(x => x) .OrderByDescending(x => x.Count()) .... 阅读全文
posted @ 2014-05-28 16:03 等待是一生最初的苍老 阅读(583) 评论(0) 推荐(0) 编辑
摘要:internal class CacheHelper { /// /// Insert value into the cache using /// appropriate name/value pairs /// //... 阅读全文
posted @ 2014-05-08 14:31 等待是一生最初的苍老 阅读(142) 评论(0) 推荐(0) 编辑
摘要:/// /// 获取枚举Description的Name /// /// 枚举 /// public static string GetDescription(Enum enumName) { var name = enumName.ToString(); var type = enumName.GetType(); var fieldInfo = type.GetField(name); var arrDesc = (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAt... 阅读全文
posted @ 2013-12-27 09:31 等待是一生最初的苍老 阅读(248) 评论(0) 推荐(0) 编辑
摘要:<!-- JiaThis Button BEGIN --> <div id="ckepop"> <a class="jiathis_button_renren"></a><a class="jiathis_button_tsina"></a><a class="jiathis_button_tqq"> </a><a class="jiathis_button_douban"></a& 阅读全文
posted @ 2013-04-28 18:05 等待是一生最初的苍老 阅读(127) 评论(0) 推荐(0) 编辑
摘要:Convert.ToDateTime("2013/04/16 00:00:00.000").ToString("yyyy-MM-dd"); 阅读全文
posted @ 2013-04-26 15:48 等待是一生最初的苍老 阅读(156) 评论(0) 推荐(1) 编辑
摘要:比如在2010中打开2012的项目1,用记事本打开sln文件2,将修改为11.00和2010保存即可用vs2010打开2012的项目了 阅读全文
posted @ 2013-04-25 22:48 等待是一生最初的苍老 阅读(285) 评论(0) 推荐(0) 编辑
摘要:url重写的好处:1,方便搜索引擎检索到(html格式的网站搜索引擎记住的优先级最高,seo优化更好)2,url更加简洁,方便用户记忆3,隐藏网页的实际路劲和具体开发技术使用URLRewriter.dll重写使用URLRewriter.dll后,只需要使用如下步骤将可以进行url重写1,在webconfig下写入 <Rules> <!-- 规则1 --> <RewriterRule> <LookFor>~/d(\d+)\.html </LookFor> <SendTo>~/default.aspx?id=$1 </S 阅读全文
posted @ 2013-04-21 18:11 等待是一生最初的苍老 阅读(617) 评论(1) 推荐(0) 编辑
摘要:public static string DislodgeHtml(string strHtml){string[] aryReg ={@"<script[^>]*?>.*?</script>",@"<(\/\s*)?!?((\w+:)?\w+)(\w+(\s*=?\s*(([""'])(\\[""'tbnr]|[^\7])*?\7|\w+)|.{0})|\s)*?(\/\s*)?>",@"([\r\n])[\s]+",@"&a 阅读全文
posted @ 2013-03-28 22:22 等待是一生最初的苍老 阅读(158) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示