CollectionHelper.cs 569 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. namespace HTEX.Complex
  3. {
  4. public static class CollectionHelper
  5. {
  6. public static bool IsEmpty(this ICollection collection)
  7. {
  8. if (collection != null && collection.Count > 0)
  9. {
  10. return false;
  11. }
  12. return true;
  13. }
  14. public static bool IsNotEmpty(this ICollection collection)
  15. {
  16. if (collection != null && collection.Count > 0)
  17. {
  18. return true;
  19. }
  20. return false;
  21. }
  22. }
  23. }