using System; using System.Collections; using System.Collections.Generic; using System.Text; namespace TEAMModelOS.SDK { public static class CollectionHelper { /// /// 判断集合是否为空 /// /// /// public static bool IsEmpty(this ICollection collection) { if (collection != null && collection.Count > 0) { return false; } else { return true; } } /// /// 判断集合是否不为空 /// /// /// public static bool IsNotEmpty(this ICollection collection) { if (collection != null && collection.Count > 0) { return true; } else { return false; } } } }