I would like to use LINQ to count how many times there is a match in a List<T>. The count need to tell me how may times that a productid and customerid exist in the List<T>. I have this code that I pieced together from googling this subject.
Can I use this code to get the number of datarows? It is not currently and am not sure what is wrong. This will be the first time that I attempt to use LINQ.Code:var drow = from DataRow myRow in dt.Rows where myRow["ProductID"].ToString() == PMTDProductID select myRow;




Reply With Quote