Ls.cs 816 B

123456789101112131415161718192021222324252627
  1. //************************************************************************
  2. // author: yuzhengyang
  3. // date: 2018.3.27 - 2018.6.3
  4. // desc: 工具描述
  5. // Copyright (c) yuzhengyang. All rights reserved.
  6. //************************************************************************
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. namespace Azylee.Core.DataUtils.CollectionUtils
  12. {
  13. public static class Ls
  14. {
  15. /// <summary>
  16. /// 列表至少有一个元素
  17. /// </summary>
  18. /// <typeparam name="T"></typeparam>
  19. /// <param name="list"></param>
  20. /// <returns></returns>
  21. public static bool Ok<T>(IEnumerable<T> list)
  22. {
  23. return ListTool.HasElements(list);
  24. }
  25. }
  26. }