Enumerable.Any 扩展方法可以判断集合为空: 如果不为空 if (!source.Any()) { //... } 转载于:https://www.cnblogs.com/fumj/p/3578388.html