/*------------------------------------------------------------------ -- COPYRIGHT (C) 2011-2020 hanhe -- ALL RIGHTS RESERVED. -- han he -- CREATE DATE: 2014/06/27 -- CREATE MAN: 姜新军 -- 对IList数据集合方法的扩充 -- MODIFY HISTORY: -- MODIFY DATE: -- MODIFY MAN: -- MODIFY DESC: -- MODIFY DATE: -- MODIFY MAN: -- MODIFY DESC: ---------------------------------------------------------------------*/ using System; using System.Collections; using System.Collections.Generic; using System.Data; namespace HH.WMS.Utils { /// /// 对集合的扩展方法 /// public static class CollectionUti { /// /// 查看一个集合是否有数据 /// /// 列表 /// public static bool HasItem(IList list) { return list != null && list.Count > 0; } /// /// 把字符串集合,用符号连接起来 /// /// 分隔符号 /// 字符串集合 /// 字符串 public static string Join(string separate, List stringList) { if(!HasItem(stringList)) { return ""; } return string.Join(separate, stringList.ToArray()); } } }