/// <summary> /// 过滤文件名 /// </summary> private static string FilterFileName(string fileName) { fileName = Regex.Replace(fileName, "\\W", ""); return(String.PinYin(fileName)); }
/// <summary> /// 转换为用分隔符连接的字符串 /// </summary> /// <typeparam name="T">集合元素类型</typeparam> /// <param name="list">集合</param> /// <param name="quotes">引号,默认不带引号,范例:单引号 "'"</param> /// <param name="separator">分隔符,默认使用逗号分隔</param> public static string Join <T>(this IEnumerable <T> list, string quotes = "", string separator = ",") { return(String.Join(list, quotes, separator)); }