C#数据之List

一、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();

猜你喜欢

转载自www.cnblogs.com/code1992/p/10547725.html