linq判断集合是否为空的方法

Enumerable.Any 扩展方法可以判断集合为空:

如果不为空

if (!source.Any()) { //...
}
原文地址:https://www.cnblogs.com/fumj/p/3578388.html