摘要: 1 /// <summary> 2 /// 字符串简体转繁体 3 /// </summary> 4 /// <param name="strSimple"></param> 5 /// <returns></returns> 6 public static string ToTraditionalChinese(string strSimple) 7 { 8 string strTraditional = Microsoft.VisualBasic.Strings.StrConv(strSimple, 阅读全文
posted @ 2013-03-14 14:15 Clin 阅读(4210) 评论(1) 推荐(0) 编辑
摘要: 1 public class CSVFileHelper 2 { 3 /// <summary> 4 /// 将DataTable中数据写入到CSV文件中 5 /// </summary> 6 /// <param name="dt">提供保存数据的DataTable</param> 7 /// <param name="fileName">CSV的文件路径</param> 8 public static void SaveCSV(DataTable dt, string fullP 阅读全文
posted @ 2013-03-14 11:29 Clin 阅读(94683) 评论(20) 推荐(9) 编辑
摘要: 1、判定一个给定的路径是否有效,合法 通过Path.GetInvalidPathChars或Path.GetInvalidFileNameChars方法获得非法的路径/文件名字符,可以根据它来判断路径中是否包含非法字符;2、如何确定一个路径字符串是表示目录还是文件 使用Directory.Exists或File.Exist方法,如果前者为真,则路径表示目录;如果后者为真,则路径表示文件 上面的方法有个缺点就是不能处理那些不存在的文件或目录。这时可以考虑使用Path.GetFileName方法获得其包含的文件名,如果一个路径不为空,而文件名为空那么它表示目录,否则表示文件;3、获得路... 阅读全文
posted @ 2013-03-14 11:26 Clin 阅读(508) 评论(0) 推荐(0) 编辑