一、C# List根据值找到索引值方法

List<int> test = new List<int>();

int index = test .FindIndex(item=>item.Equals(888));

 

二、查询List类中是否有指定的变量

int count = (from p in listProduct where p.ProductName == form.name select p).Count();

 

相关文章:

  • 2021-12-23
  • 2022-01-04
  • 2021-05-21
  • 2021-08-10
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
  • 2021-10-12
相关资源
相似解决方案