using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Untity { /// /// 字符串列表辅助类 /// public class StringListHelper { //分割字符 private const char _split = ','; /// /// 转化为字符串 /// public static string ToString(IEnumerable list) { if (list == null || list.Count() < 1) return string.Empty; return string.Join(_split.ToString(), list); } /// /// 转化为列表 /// public static List ToList(string str) { if (string.IsNullOrEmpty(str)) return new List(); return str.Split(_split).ToList(); } } }