1 /*
2  *curStatsResult是List<string>类型,
3  *x.GetAllOsVersion()结果是string[]类型,
4  *这里是先使用SelectMany()返回一个结果,再用Count()进行统计数字
5  *而不是在SelectMany()中直接使用Count()方法
6 */
7 int amd64CountPart = curStatsResult.PartLost.SelectMany(
8 x => x.GetAllOsVersion()).Count(k=>k.Contains("NTamd64"));
View Code

相关文章:

  • 2022-01-22
  • 2021-12-16
  • 2021-08-11
  • 2021-08-15
  • 2022-03-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2022-02-07
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
相关资源
相似解决方案