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

 

posted @ 2019-03-17 17:00  quanzhan  阅读(851)  评论(0编辑  收藏  举报