![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C Sharp(C#)
文章平均质量分 59
sjr_hero
这个作者很懒,什么都没留下…
展开
-
遍历Dictionary
Dictionary<string, string> dic = new Dictionary<string, string>(); foreach (KeyValuePair<string,string> item in dic) { if (item.Key==areaSN) { tempItem = ite...2011-01-26 13:19:00 · 58 阅读 · 0 评论 -
无限级树算法(递归)
此算法所用数据库为整个河南省地区(省、市、县) /* * 无限级树算法 */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Data.SqlClient; namespace ConAp...2011-02-10 18:14:00 · 372 阅读 · 0 评论 -
C#去除字符串空格的方法
//方法一,使用正则表达式: /*zfc是输入或要检测的字符串。*/ System.Text.RegularExpressions.Regex.Replace(zfc, "([ ]+)", ""); //方法一,使用字符串自带的Replace方法: zfc.Replace(" ",""); //方法三:根据空格的ASCII码值是32,所以对每个字符进行判断,如果ASCII值...原创 2011-03-17 13:10:28 · 330 阅读 · 0 评论 -
繁体转简体
首先去这个地址下载类库: http://www.microsoft.com/downloads/zh-cn/confirmation.aspx?FamilyID=44cac7f0-633b-477d-aed2-99aee642fc10&DisplayLang=zh-cn 这两个提供这是微软亚洲汉字开发中心开发的。2009年3月31日,微软发布了 Microsoft Vi...原创 2011-03-21 17:36:25 · 203 阅读 · 0 评论 -
string和byte[]之间的转换
byte[]转数组string: string str = "_JunRui"; byte[] byteArr = System.Text.Encoding.Default.GetBytes(str); string转byte[]数组: string byteToStr = System.Text.Encoding.Default.GetString(byteArr); 此例...2011-03-26 16:00:25 · 291 阅读 · 0 评论 -
用VS2008打开VS2010所建的项目
vs2010建立的项目怎么在vs2008下打开!搞了N久终于试了出来!之前也在网上查了好些资料写的都是该解决方案的版本,这种说法其实不完全对!(意思是不只是改着一个),下面把这个方法给大家分享一下: 1:该解决方案的版本:找到项目的.SLN文件用记事本打开,vs2010下是: Microsoft Visual Studio Solution File, Format Version 11.0...原创 2011-04-07 16:36:48 · 136 阅读 · 0 评论