Linq语句中IEnumerable <T>判断为空办法
仅提供中文版本
TIME : 2019-06-09 15:38:45
判断集合办法
参考文章:https://blog.csdn.net/u010178308/article/details/77681573
在使用LINQ语句的时候会生成IEnumerable
source.count()的办法进进行查询,但是对于LINQ语句count无法返回我们想要的值。
Any()
在LINQ语句查询时,使用if(!source.Any())进行集合为空的判断
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.

