南骏 池
2025-05-13 7eb6cc3c9be43076802b290645f82e0de74df35f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace NewPdaSqlServer.util;
 
public class CollectionUtil
{
    /**
     * 判断集合是否为空
     * 为空时返回true
     */
    public static bool IsNullOrEmpty<T>(List<T> list)
    {
        return list == null || list.Count == 0;
    }
 
    /**
     * 判断数组是否为空
     * 为空时返回true
     */
    public static bool IsNullOrEmpty<T>(T[] array)
    {
        return array == null || !array.Any();
    }
}